Help vectors size doesn't match...why?
이전 댓글 표시
This is my code to evaluate Lagrange where x_in are the given interpolation points and x_out is suppose to be f(x_in), but it keeps saying x_in and x_out don;t have the same vector length
x = -1:50;
y = 1.0 ./ (1+9*x.^2);
x_in=linspace(-1,1,100);
x_out=(1.0) ./ (1+9*(x_in).^2);
y_out=make_Ln(x,x_in,x_out);
plot(x,y,':',x_in,y_out,'*');
title('Lagrange Interpolation:x_in=linspace(-1,1,100)')
legend('y','Interpolation');
figure;
댓글 수: 6
Zoltán Csáti
2014년 10월 23일
Show your make_Ln function.
Guillaume
2014년 10월 23일
And also give us the exact error message you get, particularly the bit that shows you the failing instruction.
cakey
2014년 10월 23일
cakey
2014년 10월 23일
cakey
2014년 10월 23일
cakey
2014년 10월 23일
편집: Andrei Bobrov
2014년 10월 24일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!