From: antonio ferreira on 27 Jul 2010 05:03 Hi all. I have a single code for solving two problems.In this context the variables are the same but their values are different.I want to plot some values of the variables for problem 1 and for problem 2.I have saved the variables with different names, however when I do load one variable substitutes the other.Does anyone now how can i solve this? regards
From: Joseph on 27 Jul 2010 11:38 "antonio ferreira" <edgar.acferreira(a)gmail.com> wrote in message <i2m7c9$791$1(a)fred.mathworks.com>... > Hi all. > > I have a single code for solving two problems.In this context the variables are the same but their values are different.I want to plot some values of the variables for problem 1 and for problem 2.I have saved the variables with different names, however when I do load one variable substitutes the other.Does anyone now how can i solve this? > > regards Not sure I get the question; but it seems like there is a some confusion as to how the 'save' and 'load' functions work. When you save a .mat file, you are probably also saving the variable name. If that is the case try something like a = yourfunction(); b = yourfunction(); save workspacename; This will save two variables (a and b) that are easy to load later. I'd suggest you read the save and load documentation as well
From: Jan Simon on 27 Jul 2010 12:21 Dear Antonio, >I have saved the variables with different names, however when I do load one variable substitutes the other. The question is not clear to me. You could post the relevant Matlab code, because this is understood by a lot of people reding this newsgroup and the Matlab interpreter defines a unique meaning... If you use LOAD without an output argument, existing variables are overwritten. Therefore it is much cleaner and safer to use an output: X = load(FileName) and access the variables as fields of X. Kind regards, Jan
|
Pages: 1 Prev: Earn money$$$ just minuts its really true.. Next: GUI, axes problem |