I have a matrix with 3 rows want to increase it to 5
how sould i do it ?
A=[1,1.2,1.4,1.6,1.8;1.3,1.6,1.7,2,2.2;1.8,2,2.5,2.6,2.7]
i want to keep the min amd max value as it is and the values in between should be interpolated

댓글 수: 2

madhan ravi
madhan ravi 2018년 11월 26일
what's your desired result?
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2018년 11월 26일
first and last row would be same but the remaing rows would be interpolated

댓글을 달려면 로그인하십시오.

 채택된 답변

Jan
Jan 2018년 11월 29일

1 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

태그

질문:

2018년 11월 26일

답변:

Jan
2018년 11월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by