It's been a while since last time I used Matlab (lol), and any help would be highly appreciated :)
Currently I'm figuring out ways to get max or min values from a figure like the one attached in this post
Ideally it would be great to get the max and min with an interactive "selection window" (example is from a screenshot from Paint with the "desired concept").
The figure is a "mesh surface" with "colormap(jet)" and color bar as shown in the screenshot (attached).
I just noticed an important detail I forgot to mention... sorry
The desired values to get are based on "z" values (Colorbar), e.g.:
Suppouse I select using the "brush".
Then, "x", "y", and "z" values are exported with "Export brushed" (variable created), but now, based on the maximum (or minimum) "z" value, I'm also interested in the "x" and "y" corresponding to that max or min "z" value.
@Juan Vences as a general rule this kind of indexing work is no problem for MATLAB:
If you're data are already 3 matrices (I forget what brushing will give you):
[maxVal,maxInd]=max(z(:));
x(maxInd)
y(maxInd)
sprintf('A maximum value of %0.2f was reached at x=%0.2f, y=%0.2f', x, y, maxVal)
If x and y are vectors, and you want to turn them into matrices that match the size of z:
[xi, yi]=meshgrid(x, y);
For what it's worth, I also liked @Image Analyst's drawrectangle solution. It may offer a more extensible solution (if you already have image processing toolbox)!