필터 지우기
필터 지우기

Using interpl to plot data from a vector

조회 수: 7 (최근 30일)
sophp
sophp 2018년 11월 26일
답변: madhan ravi 2018년 11월 26일
Say if I had a vector X of 10 different values of x, and I had a set of experimental data relating x to y:
xd=[1,2,3,4,5,6]
yd=[2.5,3.5,4.5,5.5,6.5,7.5]
How would I use interpl to interpolate this experimental data for each value of x in vector X to form vector Y and then plot each x value with each y value

답변 (1개)

madhan ravi
madhan ravi 2018년 11월 26일
Read interp1() and use appropriate method that you need:
xd=[1,2,3,4,5,6]
yd=[2.5,3.5,4.5,5.5,6.5,7.5]
xx=linspace(xd(1),xd(end),1000);
yy=interp1(xd,yd,xx,'spline');
plot(xd,yd,'om',xx,yy)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by