How to calculate height from a Matlab pcolor plot?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sachin Nag
il 1 Mag 2017
Commentato: Image Analyst
il 2 Mag 2017
I have a pcolor plot in Matlab in which two objects are present. I need to calculate height (basically the distance) between these two objects. (Between the yellow line and the top) I extracted the data from the pcolor plot into a matrix and summed up the values to form one single column. How can I determine the height using this column? Thanks for any pointers or hints.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/163611/image.jpeg)
0 Commenti
Risposta accettata
Image Analyst
il 1 Mag 2017
Look for the highest peak.
% Get average vertical profile.
verticalProfile = mean(theImage, 2);
% Find highest value and it's row number:
[meanValue, row] = max(verticalProfile);
If that doesn't work then attach your original data (not a screenshot) as a PNG file.
5 Commenti
Image Analyst
il 2 Mag 2017
I'm not sure what colormap you're using but if yellow is the highest value, then row is the row of the bright straight yellow line at 0.5. Using that plus the scale you used to put the axis in pcolor, you can find the height.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Geographic Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!