How can I compare plots with matlab?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Paschalis Garouniatis
el 22 de Mayo de 2016
Comentada: Paschalis Garouniatis
el 27 de Mayo de 2016
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164830/image.jpeg)
Hello again. I have 3 plots which I have included (1.jpg). I want to compare them, evaluate their difference and draw a conclusion. The order in which I want to compare those 3 plots is (from left to right)the first with the second and the second with the third. So far, I have tried to extract data from the plots and plot the difference. It has worked for the second and third plot. The problem is that in the second and third plot I have bathymetry (brown color) so I cannot implement that method to compare the first with the second. I have made a search and found something about plot subtraction but 'till now no success. My goal here is to visualize the difference from those comparisons (qualitative approach). Thanks in advance!
3 comentarios
Image Analyst
el 22 de Mayo de 2016
What form is the data in? Is it actually an image? Or did it start as something else and then you turned it into an image?
How do other people in your field do the comparison? Surely you're not the first person ever to want to compare bathymetry data, so what have others published regarding comparison?
Respuesta aceptada
Chad Greene
el 22 de Mayo de 2016
Set the bathymetry values to NaN in all three datasets. You'll have to make a mask of NaN values. In datasets 2 and 3, is bathymetry represented by a specific pixel value? If so, set all corresponding values in dataset 1 to NaN by
data1(data2==pixelvalue) = NaN;
where pixelvalue is whatever value represents baythymetry in datasets 2 and 3.
However, it looks like plots 2 and 3 were made by setting bathymetry to brown using patch or fill? If so, use the vertices that were used to plot the bathymetry can be used to define a polygon, then find all pixels in that polygon using inpolygon. That would look something like this:
[X,Z] = meshgrid(-100:xspacing:100,0:zspacing:4000);
bathymetry = inpolygon(X,Z,bathyx,bathyz);
data1(bathymetry) = NaN;
data2(bathymetry) = NaN;
data2(bathymetry) = NaN;
2 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!