MATLAB: Interp1 for matrix

interp1 matrix

I have two velocity matrices that I want to interpolate onto a new time vector. The matrices are both 8011×60 doubles where the rows are different times and the columns are depths. Can I use interp 1 to interpolate each row onto the new time?
This is how I have it set up now (how I would use interp1 if U and V were vectors):
I took a screenshot of my workspace too if that helps.
U_new = interp1(Date,U,M1time);
V_new = interp1(Date,V,M1time);
Temp_new = interp1(Date,Temp,M1time);

Best Answer

You have to make the same number of rows for Date and U
U_new = interp1(Date,U,M1time);
% size(Date): 8013x1
% size(U): 8011x60
Didn't you get an error about size match?
Related Question