Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Sorting and extraction at each cell for entire matrix

1 回表示 (過去 30 日間)
Vesp
Vesp 2016 年 12 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello,
I have a matrix,ivtx_rcp85,that is 3 dimensional matrix and have extracted the index that represents the sorting from another matrix, idx. The third matrix is numAR which is a 2D matrix with the number of top values I would like to take the mean of to create the new ivt_rcp85_mean matrix. I am able to do this for 1 cell in the entire matrix, but I would like to find the mean for each unique top value defined by numAR at each grid cell for the entire matrix. I am not sure how to do the code below for the entire 3D matrix.
ivtx_rcp85_mean=mean(ivtx_rcp85(idx(1:numAR)));
ivty_rcp85_mean=mean(ivty_rcp85(idx(1:numAR)));
The help would be very much appreciated! Thank you
  1 件のコメント
dpb
dpb 2016 年 12 月 11 日
Not either by trying to read the description only, sorry....post a tiny datatset structured in the manner of your data with the desired result so folks can have something to sink teeth into for testing rather than try to manufacture what may/may not replicate your problem.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by