Code to determine a log of the mean for a column of numbers?
조회 수: 4 (최근 30일)
이전 댓글 표시
I actually could do with code to produce the following -I have a dataset and need a results table presenting the log of the mean, maximum and average for four different columns of numbers. So for column 1 - log of the mean, 2 - maximum, 3 - average, 4 - average.
댓글 수: 4
dpb
2022년 8월 5일
"for four different columns of numbers..."
So there are 4xN values total or just N?
And, what is
"for column 1 - log of the mean, 2 - maximum, 3 - average, 4 - average."
the duplicate of the last two intended to be?
답변 (1개)
Les Beckham
2022년 8월 5일
A = magic(4)
logmean_col1 = log(mean(A(:,1)))
max_col2 = max(A(:,2))
mean_col3 = mean(A(:,3))
mean_col4 = mean(A(:,4))
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!