Hello,
I have 480 vectors that I want to compare their means and STD, in pairs so I want 240 comparisons.
the variable names that I want to compare are:
marker1x vs lmarker1x; marker1y vs lmarker1y; marker1z vs lmarker1z; . . . marker48x vs lmarker48x; marker48y vs lmarker48y; marker48z vs lmarker48z;
I have created a loop to do this:
for i=1:48p_value_var(i)=vartest2(['marker',num2str(i),'x'],['lmarker',num2str(i),'x'])p_value_mean(i)=ttest2(['marker',num2str(i),'x'],['lmarker',num2str(i),'x'])end
But in this way matlab treats ['marker',num2str(i),'x'] as a string,
Is there any other function to do this wich matlab treats the oputput as a variable name?
Best Answer