array initialization
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
in my code i am taking 125 patches and for each patch i am getting 6 values as output of my process.. i am in need to place the 1st value of al the 125 patches in a single array ,2nd value of al 125 patches in another array ...so on upto 6 values..help me in this
0 Kommentare
Antworten (1)
Walter Roberson
am 2 Okt. 2011
numpatches = 125;
valsperpatch = 6;
pvalues = zeros(numpatches,valsperpatch);
for K = 1 : numpatches
....
thesepvals = ... %the 6 outputs of processing patch #K
pvalues(K,:) = thesepvals;
end
pval1 = pvalues(:,1);
pval2 = pvalues(:,2);
pval3 = pvalues(:,3);
pval4 = pvalues(:,4);
pval5 = pvalues(:,5);
pval6 = pvalues(:,6);
You should consider, though, whether you really need them to be in separate variables; perhaps you should just leave them in the pvalues array.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!