finding mean
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
i have a matrix of values musing the code
CLL_combinations = permute(cat(3,A,B),[3 2 1])
i get combinations like
CLL_combinations(:,:,1)
;
;
;
;
;
CLL_combinations(:,:,50)
i each combination have 2 rows and 4 rows each
for ex
CLL_combinations(:,:,) =
90.0000 90.0000 -0.1500 -0.5700 0.6300 0.6000
96.0000 96.0000 -0.0700 -0.1500 -0.0100 0.3000
now i want to find the mean in column wise by bot considering the first 2 columns
i need to display as for ex
mean
90 96 15
90 96 25
1 Kommentar
Walter Roberson
am 31 Jan. 2012
How does one determine whether one is in the middle of a 2-row combination or a 4-row combination? ("i each combination have 2 rows and 4 rows each")
Which column's mean are you taking? The sample data you show has noting that could be in the range 15 or 25 ?
Antworten (1)
Image Analyst
am 31 Jan. 2012
Not sure where the 15 and 25 came from, but...
rightPart = CLL_combinations(:, 2:end);
meanArray = mean(rightPart, 2);
Then use fprintf() to print out the stuff you want displayed row by row.
3 Kommentare
kash
am 31 Jan. 2012
kash
am 31 Jan. 2012
Walter Roberson
am 31 Jan. 2012
Image Analyst's name is not "Walter".
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!