Friday, October 27, 2006

Variable filenames in Matlab Save

In Matlab, a command such as
fname = 'foo';
save fname var1

will store var1 in fname.mat as against the desired foo.mat

A solution to this would be to issues the following two commands
foos = sprintf('save %s var1','foo');
eval(foos)

will save var1 in foo.mat

4 comments:

Anonymous said...

Thank you, matlab is so stupid sometimes...

Unknown said...

THANK YOU!!!

Anonymous said...

Good fill someone in on and this enter helped me alot in my college assignement. Thank you for your information.

Anonymous said...

It isn't hard at all to start making money online in the undercover world of [URL=http://www.www.blackhatmoneymaker.com]blackhat download[/URL], You are far from alone if you have no clue about blackhat marketing. Blackhat marketing uses alternative or misunderstood ways to generate an income online.