Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

saving all variable values in matlab's workspace together with their names

Asked by Hugo on 14 May 2013

I'd like to save all my variables in my workspace to a file together with their names in a certain way:

%<*firstVariableName>firstVariableValue(s)%</firstVariableName>
%<*secondVariableName>secondVariableValue(s)%</secondVariableName>

I'd like to save each variable on a new line. I've experimented with the function who, but I can't seem to get it to work.

I also have problem getting it to save as UTF-8, is there a simple encoding setting that could be changed?

2 Comments

Matt Kindig on 15 May 2013

Could you post your current code?

Are all variables scalar?

Walter Roberson on 15 May 2013

Is "s" to be the value, or is "firstVariableValue(s)" to be the value, or does the (s) indicate that there could be multiple values? If there could be multiple values, then how do you want to delimit them? What if the do not form a vector ? Are the values certain to be numeric ?

Hugo

Products

0 Answers

Contact us