From: DSPtree on 9 May 2010 03:07 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... Suggetions please.. I am new to Matlab. for j=1:6 m = moment(z,j); display(m); end Thanks in advance
From: dpb on 9 May 2010 08:09 DSPtree wrote: > 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... > > Suggetions please.. I am new to Matlab. > > for j=1:6 > m = moment(z,j); % as us would say, "one of many solutions"... disp(['m' num2str(j) '= ' num2str(m)]) > end --
From: DSPtree on 9 May 2010 05:52 thank you for the reply. But that command gives an error. Let me make it clear again. I got 6different solution for m So i need to display it as m1= 231221 m2=23423 m3=2312 m4=2312 ..... like that.. Regards
From: ImageAnalyst on 9 May 2010 10:18 Look up the fprintf(1, ....) function. It can print whatever you want to a file, or the command window.
From: dpb on 9 May 2010 10:19 DSPtree wrote: > thank you for the reply. > > But that command gives an error. > > Let me make it clear again. > > I got 6different solution for m > > So i need to display it as > m1= 231221 > m2=23423 > m3=2312 > m4=2312 > .... like that.. >> m=rand(6,1); % make some sample data >> for k=1:6, disp(['m' num2str(k) ' = ' num2str(m(k))]),end m1 = 0.61543 m2 = 0.79194 m3 = 0.92181 m4 = 0.73821 m5 = 0.17627 m6 = 0.40571 >> Any error would have been simply a typo in previous posting or an error on your attempt...since you didn't provide even a clue as to what the error was what, specifically is unknown... --
|
Next
|
Last
Pages: 1 2 Prev: Problem-counting people Next: www.voguesneakers.com Cheap Jordans,Cheap Air Max 90,Cheap Nikes |