Row interpolation by adding data at end of the matrix

조회 수: 1 (최근 30일)
Abhiraj Gupta
Abhiraj Gupta 2019년 7월 31일
댓글: Abhiraj Gupta 2019년 7월 31일
I have a variable d which is a row matrix of 1x18
d=[24.1615256950601 24.1615256699363 24.1615256438020 24.1615256182430 24.1615256053197 24.1615255801960 24.1615255672726 24.1615255402679 24.1615255131230 24.1615255004873 24.1615254753636 24.1615254509627 24.1615254248284 24.1615254114699 24.1615253988342 24.1615253870690 24.1615253734228 24.1615253590537]
I want to extend the length of the matrix to 1x20. If I am using interp1 it's showing NAN at pos 19,20.
I want to extend the curve to 20 points how should I do it...???

채택된 답변

Stephen23
Stephen23 2019년 7월 31일
>> V = interp1(1:18,d,1:20,'pchip','extrap');
>> V(:)
ans =
24.1615256950601
24.1615256699363
24.1615256438020
24.1615256182430
24.1615256053197
24.1615255801960
24.1615255672726
24.1615255402679
24.1615255131230
24.1615255004873
24.1615254753636
24.1615254509627
24.1615254248284
24.1615254114699
24.1615253988342
24.1615253870690
24.1615253734228
24.1615253590537
24.1615253439804
24.1615253282587

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by