MATLAB Answers

How can I do an image like this in Matlab?

1 view (last 30 days)
Miguel Lopes
Miguel Lopes on 27 Jan 2015
Commented: Star Strider on 27 Jan 2015
I got the data in 3 vectors like this:
X Y Intensity
0 1 4
0 2 3
1 0 9
I want to interpolate between the points, to have a continuous plot.
I just need to know the name of that kind of plot please or the name of the command in Matlab, I'll do the code myself.
Thank you very much!


Sign in to comment.

Answers (1)

Star Strider
Star Strider on 27 Jan 2015
From the data you presented, I would use scatteredInterpolant class.


Show 3 older comments
Image Analyst
Image Analyst on 27 Jan 2015
I'd use scatteredInterpolant, like Star suggested, then use image() or imshow() to display the interpolated image.
Miguel Lopes
Miguel Lopes on 27 Jan 2015
I already did it, thanks!
I didn't need to interpolate because contour does it by itself!
Now i wanted to do a legend like assigning the value of the intensity to a color, can you give me any tips regarding that??
Star Strider
Star Strider on 27 Jan 2015
My pleasure!
The colour legend won’t look like the one in your Question, but the functions you want are colorbar and colormap.

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!