フィルターのクリア

Please explain for me this code , and what does each function do in detail ?

1 回表示 (過去 30 日間)
Alhussain AlAbbas
Alhussain AlAbbas 2021 年 10 月 13 日
コメント済み: Kevin Holly 2021 年 10 月 14 日
function s=lagrangeP(x,X,Y)
format long
n=size(X);
L=ones(n);
for i=1:n
for j=1:n
if (i~=j)
L(i)=L(i).*(x-X(j))./(X(i)-X(j));
end
end
end
s=0;
for i=1:n
s=s+Y(i)*L(i);
end

回答 (1 件)

Kevin Holly
Kevin Holly 2021 年 10 月 13 日
  3 件のコメント
Alhussain AlAbbas
Alhussain AlAbbas 2021 年 10 月 14 日
Thank you!
Kevin Holly
Kevin Holly 2021 年 10 月 14 日
No problem. If this answers your question, I would appreciate it if you accepted the answer.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by