Ok then, So… I have (2) 3 x19 matrices, A and B I want to perform anova1 on the first 3 elements of A and the first 3 elements in B Then I need to save individual results into a 3rd matrix that aligns with A and B(if possible) This is what I have so far…
G= 19 % loop count For k= 1:g C=[A(:,1),B(:,1)] % combines 1st column from A with 1st column from B P=anova1(C) % performs anova on “C” and displays answer A(:,1)=[], B(:,1)=[] % removes 1st column from A and B and moves next column into loop end
I think I need to pre-allocate an empty matrix(1x19) to hold the answers as a group and in order, but I can’t find it in the manuals…thanks for your input and time…i have 8 weeks in matlab...be gentle
"save" to store the result of an applied function...in this case i get 19 individual results...(that need to be stored or saved together as a group) "1 individual matrix"== all 19 answers saved together in a new "vertex" or a 1x19 matrix...sorry still learning the jargon
this works...thankyou...can you tell why matlab seperates my identifier column and row of column headers from the data...and how to put them back together...with a new column of data...i have G= [A,B,Z] %%which puts the data columns and the answer column together..
the anova1() function displays a table and chart, along with the p-value,the manual says that i can turn this display off,but it doesn't say how... can you rewrite the p(k)= anova1(Z)....i've tried p(k)= anova1(Z, ,'off'),...=anova1(Z,'off')...idk what to do...what am i not getting?
but if i don't remove the cloumns from X and Y won't i just get the same answer 19 times...how do i tell matlab to move to the next set of elements in A and B???
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
4 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148159
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148159
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148337
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148337
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148338
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148338
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148340
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/75236-how-do-i-save-looped-output-into-1-variable-matrix#comment_148340
Sign in to comment.