interp1 and spline error
이전 댓글 표시
hi
i want to plot following series of values with respect to m which is (0:0.1:1). by connecting them in a sequence where n=1:11 K(n,:)=[m angle(n,1)]
30.7718
30.1766
27.9563
29.3494
30.5871
31.0456
47.2866
29.2492
27.7123
30.8852
33.4237
i have written the following program but gives no desired results
t = 0:.1:m;
x = K(:,1);
y = K(:,2)
tq = 1:0.01:m;
x1q = interp1(t,x,tq,'spline');
y1q = interp1(t,y,tq,'spline');
plot(x1q,y1q)
axis([0 1 0 100])
grid
kindly can any one rectify the error, thanks
댓글 수: 1
Image Analyst
2015년 6월 30일
What's that list of numbers for?
채택된 답변
추가 답변 (1개)
Torsten
2015년 6월 30일
0 개 추천
My guess is that you mean
tq = 0:0.01:m;
instead of
tq = 1:0.01:m;
Best wishes
Torsten.
카테고리
도움말 센터 및 File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!