Stuart’s MATLAB Videos

Watch and Learn

Writing out your workspace variables as a script with Simulink.saveVars 4

Posted by Doug Hull,

I almost never use Simulink, so I never saw this function before (requires Simulink). Try this at the command line: a = 1; b = 2.5; c = 'A string'; d = {a, b, c}; Simulink.saveVars('MyVars'); It produces a file like this: % ------------------------------------------------------------------- % MATLAB file generated by Simulink.saveVars on 27-Sep-2010 13:52:16 % MATLAB version:... read more >>