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!