Smooth curves how to

조회 수: 1 (최근 30일)
Simba Matema
Simba Matema 2019년 7월 15일
답변: KSSV 2019년 7월 15일
Hi
got three data points and need to join them with smooth curve insted of a straight line.
please help.
commands below..
x=[1 2 3];
y=[1.22 3.31 1.91];
plot(x,y)
hold on
y1=[1.1 1.65 0.60];
plot(x,y1)
hold on
y2=[1.22 3.48 2.44];
plot(x,y2)
hold on
y3=[2.61 2.61 2.39];
plot(x,y3)
hold on
y4=[1.39 2.44 0.87]
y4 =[1.3900 2.4400 0.8700]
plot(x,y4)
hold on
y5=[0.57 0.65 0.28];
plot(x,y5)
hold on
z=[2.0 2.0 2.0];
plot(x,z)

채택된 답변

KSSV
KSSV 2019년 7월 15일
x=[1 2 3];
y=[1.22 3.31 1.91];
xx = min(x):0.1:max(x);
yy = spline(x,y,xx);
plot(x,y,'r',xx,yy,'b')

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by