Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

trying to output mean values that were calculated into excel.

조회 수: 1(최근 30일)
isamh 2020년 10월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
i have about 40 values that were calcualted but would only like to output 10 out of the 40. i calculated the mean, Standard deviation and addition, how would i only take the mean values and output them into excel?
댓글 수: 3표시숨기기 이전 댓글 수: 2
isamh 2020년 10월 15일
i want to do an excel sheet that is 3x10
mean_speed mean_force mean_power
mean_1
.
.
.
mean_10

답변(1개)

KSSV 2020년 10월 15일
May be you want to find the mean for every four elements and get 10 means. See the below:
A = rand(1,40) ; % random data for demo
M = mean(reshape(A,10,[]),2) ; % reshape and get mean
If you want t0 select any 10 elements randomly, use:
A = rand(1,40) ;
M = A(randperm(40,10)) ;
If you want to select first 10 elements
A = rand(1,40) ;
M = A(1:10) ;
Use writetable, xlswrite to write array M into xls file.
댓글 수: 3표시숨기기 이전 댓글 수: 2
isamh 2020년 10월 15일
i did the table, how can i get them ontop of each other?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!