Row interpolation by adding data at end of the matrix

2 visualizaciones (últimos 30 días)
Abhiraj Gupta
Abhiraj Gupta el 31 de Jul. de 2019
Comentada: Abhiraj Gupta el 31 de Jul. de 2019
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...???

Respuesta aceptada

Stephen23
Stephen23 el 31 de Jul. de 2019
>> 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

Más respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by