Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: create new variable name and save worksapce with it
Replies: 3   Last Post: Dec 24, 2010 7:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
ben

Posts: 140
Registered: 6/23/09
Re: create new variable name and save worksapce with it
Posted: Dec 24, 2010 7:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Ilham Hardy" wrote in message <if20l0$std$1@fred.mathworks.com>...
> "ben harper" wrote in message <if1rg0$nd$1@fred.mathworks.com>...
> > i have three variables in workspace "x","y","z"
> >
> > i change test number regarding to my scenario
> > variable name is "testno"
> >
> > when testno=2
> > i want to save x,y,z variables
> > to a file called testno2.mat
> >
> > when i change it to testno=447
> > save these variables to testno447.mat
> >
> > how can i do? thank you

>
> HI,
>
> Please try,
>
> file_name = testno
> save(file_name, format, '-mat')
>
>
> HTH,
> Ilham


This didn't worked..
i also tried this but also didn't worked.


filename = testno;
save('filename', 'x', 'y', 'z' '-mat')



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.