How can I compare plots with matlab?
4 次查看(过去 30 天)
显示 更早的评论

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 个评论
Image Analyst
2016-5-22
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?
采纳的回答
Chad Greene
2016-5-22
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;
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!