Clear Filters
Clear Filters

how to interpolation from small matrix to large matrix.

11 views (last 30 days)
how can I interpolation matrix from 7x7 to 70x70? otherwise, imresize is failed for major value in matrix 7x7. I confuse about interp2 that which will be the peaks or else.
M = [
26.6536850000000 26.2116960000000 25.7796660000000 25.5484060000000 25.3228370000000 25.0957440000000 25.0041480000000
28.4801820000000 27.9432550000000 27.4145080000000 27.2323110000000 27.0571170000000 26.8760090000000 26.6948490000000
29.9440660000000 29.4085810000000 28.8797540000000 28.6681150000000 28.4651270000000 28.2585010000000 28.1512510000000
31.4023710000000 30.8655880000000 30.3369250000000 30.0879120000000 29.8463940000000 29.6012150000000 29.5798550000000
32.8606770000000 32.3225940000000 31.7940950000000 31.5077100000000 31.2276610000000 30.9439290000000 31.0084580000000
35.3245990000000 34.9917560000000 34.6621570000000 34.3190500000000 33.9818450000000 33.6506420000000 33.5333720000000
37.8039920000000 37.6987970000000 37.5974040000000 37.2201680000000 36.8485640000000 36.4937550000000 36.1883560000000];

Accepted Answer

Walter Roberson
Walter Roberson on 27 Oct 2019
Edited: Walter Roberson on 27 Oct 2019
newM = imresize(M, [70 70]);
I just tried it and no error message was produced. You should explain further what "failed for major value in matrix" means to you.
Are you talking about the fact that imresize() is producing an maximum output that exceeds the maximum of the input? imresize() projects values based upon the local gradient, so it is normal for it to overshoot the peak and undershoot the smallest value.
  3 Comments
Walter Roberson
Walter Roberson on 27 Oct 2019
newM = imresize(M, [70 70], 'bilinear');
The default is bicubic, which uses a 4 x 4 neighbourhood.
AniCnx
AniCnx on 27 Oct 2019
ok. I got it. it's about the number of the interval. Thanks for your comments.

Sign in to comment.

More 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!