Info
此问题已关闭。 请重新打开它进行编辑或回答。
Sorting and extraction at each cell for entire matrix
1 次查看(过去 30 天)
显示 更早的评论
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
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!