How can I find the Difference between the Min and Max of all matching cells over different matrices?
Ältere Kommentare anzeigen
Basically I have 12 matrices each for a month of the year (33x45). For each cell I want to know the difference between the max and min values recorded for the entire year.
I then want an output that is another matrix with the resulting differences in the appropriate cells.
Thanks in advance for any assistance :)
1 Kommentar
Image Analyst
am 8 Okt. 2014
Cells? Is the array a cell array or just a regular double numerical array? It's an important distinction regarding how you need to reference the cells or elements.
Akzeptierte Antwort
Weitere Antworten (1)
Aslak Grinsted
am 1 Okt. 2014
0 Stimmen
I would put the 12 matrices in a 33x45x12 matrix.
Then you can simply call
max(x,3)-min(x,3)
the '3' refers to take the maximum along the 3rd dimension of x.
1 Kommentar
Robert
am 8 Okt. 2014
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!