필터 지우기
필터 지우기

I am trying to plot my spline with clamped conditions and I am not sure why it is not letting me plot

조회 수: 6 (최근 30일)
%% clamped boundary conditions -0.5 to 0.5
t = [160 180 195 225 250 280 300].';
y = [ 78.3 81.4 84.5 85.1 89.3 91.7 94.8].';
cs = spline(t,[-0.5 y 0.5]);
xx = linspace(160,300,50);
plot(t,y,'o',xx,ppval(cs,xx),'-');

채택된 답변

Joe Vinciguerra
Joe Vinciguerra 2019년 11월 22일
%%clamped boundary conditions -0.5 to 0.5
t = [160 180 195 225 250 280 300];
y = [78.3 81.4 84.5 85.1 89.3 91.7 94.8];
cs = spline(t,[-0.5 y 0.5]);
xx = linspace(160,300,50);
plot(t,y,'o',xx,ppval(cs,xx),'-');

추가 답변 (1개)

Walter Roberson
Walter Roberson 2019년 11월 22일
%% clamped boundary conditions -0.5 to 0.5
t = [160 180 195 225 250 280 300].';
y = [ 78.3 81.4 84.5 85.1 89.3 91.7 94.8].';
cs = spline(t,[-0.5; y; 0.5]); %changed because y is column vector
xx = linspace(160,300,50);
plot(t,y,'o',xx,ppval(cs,xx),'-');

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by