Rank value matrix from 3d Matrix
I have a 3d matrix of average global temperatures (0.5 degree lat/long) for 42 years (42×720×1440). For a given year (say year 42) I want to create a new matrix (720 × 1440) that ranks each lat/long pair based on the other 41 years. So if a lat/long pair is warmest, it will have a rank value of 1. If it’s coolest, it will have a rank value of 42. The resulting matrix will be 720 x 1440 matrix of values ranked from 1 to 42 based on the original matrix. Is there a simple way to take a given year from the original matrix to do this without looping?I have a 3d matrix of average global temperatures (0.5 degree lat/long) for 42 years (42×720×1440). For a given year (say year 42) I want to create a new matrix (720 × 1440) that ranks each lat/long pair based on the other 41 years. So if a lat/long pair is warmest, it will have a rank value of 1. If it’s coolest, it will have a rank value of 42. The resulting matrix will be 720 x 1440 matrix of values ranked from 1 to 42 based on the original matrix. Is there a simple way to take a given year from the original matrix to do this without looping? I have a 3d matrix of average global temperatures (0.5 degree lat/long) for 42 years (42×720×1440). For a given year (say year 42) I want to create a new matrix (720 × 1440) that ranks each lat/long pair based on the other 41 years. So if a lat/long pair is warmest, it will have a rank value of 1. If it’s coolest, it will have a rank value of 42. The resulting matrix will be 720 x 1440 matrix of values ranked from 1 to 42 based on the original matrix. Is there a simple way to take a given year from the original matrix to do this without looping? matrix, rank MATLAB Answers — New Questions