Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Sorting and extraction at each cell for entire matrix

1 Ansicht (letzte 30 Tage)
Vesp
Vesp am 10 Dez. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentar
dpb
dpb am 11 Dez. 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.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by