From: Steven Lord on 9 May 2010 22:20 "DSPtree" <paulscot45(a)yahoo.com> wrote in message news:116172535.97656.1273403255814.JavaMail.root(a)gallium.mathforum.org... > need to display > 'z' is some random value. its a part of another program. > > Now I want to display the result as m1,m2,m3,m4,m5,m6. how would i do it? > shall i use another for loop? but whats the format then? or else i have to > go for 6 display commands for each of them... Are you attempting to _display_ the results like this or are you trying to create individual variables named m1, m2, etc.? If the latter, DON'T -- see Q4.6 in the newsgroup FAQ for an explanation why this is discouraged. If the former, use FPRINTF. for k = 1:6 fprintf('m%d is %d', k, k.^2) end -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: DSPtree on 10 May 2010 11:24 hey .. thank you so much.. it worked. thanks a lot
First
|
Prev
|
Pages: 1 2 Prev: Problem-counting people Next: www.voguesneakers.com Cheap Jordans,Cheap Air Max 90,Cheap Nikes |