Info
此问题已关闭。 请重新打开它进行编辑或回答。
finding mean
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2012-1-31
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 ?
回答(1 个)
Image Analyst
2012-1-31
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 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!