Comments on: A MATLAB vs. Simulink battle? I’m in! https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/?s_tid=feedtopost Guy Rouleau is an Application Engineer for MathWorks. He writes here about Simulink and other MathWorks tools used in Model-Based Design. Fri, 26 Sep 2014 09:10:03 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: diego https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-84404 Fri, 26 Sep 2014 09:10:03 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-84404 Hello, guys. I have a question about the code generation using Stateflow. In MAAB style guideline, there is a rule applied to logic in Stateflow: Matlab functions can not be used and the rule priority is mandatory. Can anybody give me an explaination? Many thanks.

]]>
By: Sebastian Castro https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-80141 Sat, 06 Sep 2014 03:20:32 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-80141 Yin: Yep, with Simulink Report Generator you can graphically merge models from the same comparison report.

https://www.mathworks.com/products/SL_reportgenerator/features.html#comparing-and-merging-simulink-models

]]>
By: wei https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-78760 Sun, 31 Aug 2014 18:57:33 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-78760 Follow up on 1. code gen comparison and 2. integration of two workflows would be worthwhile.

]]>
By: yin https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-78345 Fri, 29 Aug 2014 05:49:07 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-78345 Hi, Sebastian, I agree that for embedded project, the generated code is better for comparing. How about model merging? can we do model merging from Report?

]]>
By: Sebastian Castro https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-76699 Wed, 20 Aug 2014 16:44:09 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-76699 Lee,

Simulink Projects *is* a part of core Simulink, so you do get the SVN/Git integration with a standard Simulink installation.

The “forking out” would be for Simulink Report Generator, which (among other things) provides functionality for comparing and merging Simulink models.

Putting it together, you can do your diffing across SVN/Git revisions right from the Simulink Project.

]]>
By: Lee Wren https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-76650 Wed, 20 Aug 2014 10:44:51 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-76650 The answer to which is best depends largely on your background, and what you’re used to. In my opinion, Simulink if better for top-level functional and data-flow visualisation, Matlab is better for “low-level” implementation.

The big disadvantage of Simulink is the lack of traceability of algorithms through revision control systems (we use SVN). The lack of a suitable difference tool (without forking out for Simulink Projects, which in my opinion should be a core component of Simulink) makes tracability virtually impossible. The file format (MDL) also changes significantly between saves leading to larger SVN repos. The introduction of the binary model format (SLX) is likely to compound that.

As a result we try to use as much embedded M, with each embedded M function just calling a standalone function to do the work. This approach also allows:
– Easier unit testing of the “low-level” function
– Traceability through SVN

A big downside of this approach is that codegen of embedded M doesn’t appear to be able to suitably resolve the difference between one-indexed arrays (M) and zero-indexed arrays (C), leading to (more) inefficient code.

]]>
By: James Boyd https://blogs.mathworks.com/simulink/2014/08/19/a-matlab-vs-simulink-battle-im-in/#comment-76621 Wed, 20 Aug 2014 08:54:34 +0000 https://blogs.mathworks.com/seth/?p=4058#comment-76621 Simulink’s preferred:
The library browser makes it easy to find what’s available.
The interface to each block is usually more clear, and the dialog box shows how they can be configured – rarely do I need to open the documentation to understand a block, the information’s much more readily available.

I tend to use Matlab only for processing files/logs into graphs – it’s not work doing that in Simulink.

]]>