MATLAB Answers


how to interpolate column?

Latest activity Answered by Jan
on 29 Nov 2018
Accepted Answer by Jan
I have a matrix with 3 rows want to increase it to 5
how sould i do it ?
i want to keep the min amd max value as it is and the values in between should be interpolated


madhan ravi
2018 年 11 月 26 日
what's your desired result?
first and last row would be same but the remaing rows would be interpolated

Sign in to comment.

1 Answer

回答者: Jan
2018 年 11 月 29 日

What about:
A = [1,1.2,1.4,1.6,1.8; ...
1.3,1.6,1.7,2,2.2; ...
n = 7;
B = interp1(1:size(A, 2), A.', linspace(1, size(A, 2), n))


Sign in to comment.