Adding additional points to matrix image

4 views (last 30 days)
Thabo Mulambo
Thabo Mulambo on 6 Jan 2020
Commented: Thabo Mulambo on 6 Jan 2020
Hallo,
I have a matrix called my_data and unfortunately the data points are sparse and they produce the following image:
How can I edit the matrix to produce a smooth curve? I have tried interp2 and pcolor with shading interp but the points are still not jointed.
Here is the code I have found on the Internet and edited to suit my application
[A,B] = meshgrid(1:size(my_data,2), 1:size(my_data,1));
[A2,B2] = meshgrid(1:0.01:size(my_data,2), 1:0.01:size(my_data,1));
interped = interp2(A, B, my_data, A2, B2, 'linear');
imagesc(interped)
  2 Comments
Thabo Mulambo
Thabo Mulambo on 6 Jan 2020
When I increase the grid points I run into memory issues and the computer freezes...

Sign in to comment.

Answers (0)

Categories

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!