MATLAB Answers

I have a array of 61 number, i want to take mean of 1st and 17th number, then 2nd and 18th number and then want to put this mean values in a array?

3 ビュー (過去 30 日間)

回答 (1 件)

KSSV 2021 年 7 月 29 日
A = rand(1,61) ;
idx = [(1:46)' (16:61)'] ; % get indices
iwant = mean(A(idx),2)
  7 件のコメント
Subhodh Sharma
Subhodh Sharma 2021 年 7 月 29 日
@kssv thanks for your help, but this not what I was looking for. I solved it.
Thanks man!





Community Treasure Hunt

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

Start Hunting!

Translated by