Prev: discount prada clothing gucci shoes nike acg boots coogi men hoody puma shoes
Next: A Surprise Gift for you by Project Drive!!
From: talasmonster on 23 Dec 2009 21:55 hello ı am trying to write a program below.My program calculate different Vm each turn in loop and ı want to plot them at each turn. how can ı save them with different variable name? for k=1:10 Vm=[.....]; n=[1 2 3 .....]; bar(n,Vm); %now ı wanna save it. how can ı? ı wanna change saving %name each turn end
From: Loren Shure on 24 Dec 2009 08:15
In article <976757789.52386.1261659378229.JavaMail.root(a)gallium.mathforum.org>, talasmonster(a)hotmail.com says... > hello i am trying to write a program below.My program calculate different Vm each turn in loop and i want to plot them at each turn. how can i save them with different variable name? > > for k=1:10 > Vm=[.....]; > n=[1 2 3 .....]; > bar(n,Vm); > %now i wanna save it. how can i? i wanna change saving > %name each turn > end > Save what, the plot? Look at print and sprintf? If it's the variables, don't name them each time through the loop. See this entry in the FAQ for better advice: http://matlabwiki.mathworks.com/MATLAB_FAQ#How_can_I_create_variables_A1 ..2C_A2.2C....2CA10_in_a_loop.3F -- Loren http://blogs.mathworks.com/loren |