Find a local max and local min of a surface with noise
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I got the matrix above How can I find de MAXIMUM & MINIMUM locals and put the X,Y coodinate into a vector X and a vector Y and when i plot X vs Y o got the dots representating the maximum and minumum values with different color for max and min ps. remember to consider the noise
A=[0.5000 -0.2668 -0.4606 -0.0866 -0.1433 -0.2063 0.0020 -0.0684 0.0824 0.0618; -0.0700 -0.1001 -0.6211 -2.0000 -0.6901 -0.5352 -0.5370 0.6527 -0.4742 -0.2398; -0.0159 0.1090 0.0902 -0.3513 -0.5579 -0.2559 -0.1088 0.2090 -0.1592 0.0290; 0.3378 0.3437 0.4101 0.4995 0.3286 0.1963 0.0434 0.1998 0.2853 0.3430; 0.3673 0.3320 0.2836 0.3189 0.3596 0.1729 0.0493 0.2758 0.2314 0.3171; -0.7621 -0.5151 -0.3759 -0.1816 0.1758 0.0306 -0.4316 0.1782 -3.0051 -1.9493; -0.0107 -0.1784 -0.0642 -0.1268 -0.0137 0.0840 -0.1945 0.0944 -0.1449 -0.0296; 0.2212 0.1060 0.0321 3.0020 0.1965 -0.0060 0.0472 0.1958 0.1850 0.3266; 0.1410 0.2704 0.1225 0.2163 0.0337 0.1676 0.1012 0.1511 0.1105 0.3585; 0.1301 0.2741 0.0495 0.0251 0.1299 0.2433 0.0284 0.0727 0.1462 0.1443 ;]
2 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
bym
am 21 Apr. 2011
I am not sure I understand your question but is
imagesc(A)
what you are looking for?
Walter Roberson
am 22 Apr. 2011
On a discrete surface, every point is both a local max and local min -- at least until you define your neighborhood. If you want noise to be taken in to account, you also have to define either a noise detection function (if you want to ignore points with noise) or a smoothing function.
You also need to define the behaviour you want for saddle-points, that are local min in one direction but local max in another.
You might want to use gradient() perhaps.
4 Kommentare
Walter Roberson
am 25 Apr. 2011
Post the images on a service such as tinypic or imageshack and post the URL here.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!