how can i get an interpolation formula?

조회 수: 3 (최근 30일)
rodrigo pallacan acuña
rodrigo pallacan acuña 2021년 5월 12일
답변: Tanmay Das 2021년 8월 6일
hi i would like to get an interpolation formula using: spline, pchip and makima for example:
clc;clear;close all
x=[1 2 3 4 5];
v=[0 1 0 1 0];
tt=linspace(1,5);
xq=1.5;
vq1=interp1(x,v,tt,'spline');
plot(x,v,'o',tt,vq1,'r')
legend('puntos','spline','location','southeast')

답변 (1개)

Tanmay Das
Tanmay Das 2021년 8월 6일
You can look into the interp1 function for 1-D data interpolation. You can go through various Interpolation methods to know more about implementing methods like spline, pchip and makima.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by