Info
This question is closed. Reopen it to edit or answer.
finding mean
1 view (last 30 days)
Show older comments
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 Comment
Walter Roberson
on 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 ?
Answers (1)
Image Analyst
on 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 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!