필터 지우기
필터 지우기

Coefficient for Langrange Polynomial n=length(x); for k=1:n d(k)=1; for i=1:n If i~=k d(k)=d(k)*(x(k)-x(i)); end c(k)=y(k)/d(k); end end Evaluate Langrange Polynomial function p=LangrangeEval(t,x,c) m=length(x); for i=1:length(t) p(i)=0; for j=1:

조회 수: 1 (최근 30일)
Hello everyone. I need help for understanding this code. Thanks Coefficient for Langrange Polynomial n=length(x); for k=1:n d(k)=1; for i=1:n If i~=k d(k)=d(k)*(x(k)-x(i)); end c(k)=y(k)/d(k); end end
Evaluate Langrange Polynomial function p=LangrangeEval(t,x,c) m=length(x); for i=1:length(t) p(i)=0; for j=1:m; N(j)=1; for k=1:m; if(j~=k) N(j)=N(j)*(t(i)-x(k)); end end p(i)=p(i)+N(j)*c(j); end end

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by