Interpolate set of values. Griddata -> scatteredInterpolant

1 view (last 30 days)
Hi, I am quite new to MatLab. I need your help with one of my problems. I have a big matrix M(100*10) and N(100*100). I have to interpolate the data in it. currently griddata function was used for it which take much time and a warning to use scatteredInterpolant. So I tried the scatteredInterpolant for it. Unfortunately I am getting errors( such as Error using scatteredInterpolant Input data point values must be specified in column-vector format) as I couldn't understand how it is working.
for w = 1:100
[x,y,z]=griddata(M(:,8),M(:,9),N(w,:),...
min(M(:,8)):0.1:max(M(:,8)),...
(min(M(:,9)):0.1:max(M(:,9)))');
Please help me with the same. I need the z(intensity) values in the later script

Answers (1)

KSSV
KSSV on 6 Dec 2016
use interp2..
  3 Comments
Adrin Johnson
Adrin Johnson on 6 Dec 2016
Edited: Adrin Johnson on 6 Dec 2016
Hello. The matrixes M & N are not of same size. to be specific Matrix M(100*10) is the matrix with details of 100 measurement points(each row) and matrix N(10*100) is the values of the 100 measurement points(columns) at 10 time stamps. These dimensions(100*10) are just examples. In reality its much bigger :)

Sign in to comment.

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!