maps contourf, griddatat or scatterdata
2 views (last 30 days)
Show older comments
Mohamed on 25 Feb 2023
Commented: Mohamed on 26 Feb 2023
I'am trying to replot may hardness mesurement that i get from the machine
I get three data vector x, y, and h
the maps that i get from the machine is like the one below
when i replot the data with matlap i get the one below
Could anyone please give me ideas how to replot the data to get better resoltion and interpolation
thanks in adavanced
I assume you have data at the specific points shown on the Matlab plot. If that is true, then the Matlab plot looks very good to me.
Use interp2() to interpolate your original data to a finer grid. Then use contourf() on the interpolated data set.
Since your samples do not cover a full rectangular grid, use the extrapval argument to interp2(), to specify the value to use outside the sampled area.
The sampled points are not on a grid aligned with the plotted x and y, and points in the corners and along one edge are not sampled. Therefore you will have to use the "scattered points" way of specifying the measured data when you call interp2() - see here.
Try different "methods" with interp2(): maybe you will like the visual appearance of the contours more with certain methods.
I suspect you will get good help on this if you post the data file and the code you used to generate the plot.
More Answers (0)
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!