Info
This question is closed. Reopen it to edit or answer.
Sorting and extraction at each cell for entire matrix
1 view (last 30 days)
Show older comments
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 Comment
dpb
on 11 Dec 2016
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.
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!