Difference between the griddata and the source data when creating contour
Show older comments
Hello,
I have some random scatter data in X, Y Z format and would like to create the contour based on them. The data are processed using the meshgrid and griddata method. After comparing the contour and the source data, the contour level line is not matching the source data.
In the figure below, you can see the source data plotted against the contour. The scource data values are actually known for each line, like the marked 30, 29, 28. I was expecting the contour level line should match the line drawn by the source data.
I tried different interpolation method and the linear method give the best results as shown below.
Any suggestions to solve this problem?
Thanks

Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!