please explain the following loop with each line working details

1 回表示 (過去 30 日間)
PULAK Kumer
PULAK Kumer 2020 年 12 月 6 日
コメント済み: PULAK Kumer 2020 年 12 月 7 日
C=d(n,n);
fork=n-1:-1:1
C=conv(C,poly(x(k)));
m=length(C);
C(m)=C(m)+d(k,k);
end
here ,d is an array varibale

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 12 月 6 日
The origin of the code seems to be
% NUMERICAL METHODS: MATLAB Programs, (c) John H. Mathews 1995
% To accompany the text:
% NUMERICAL METHODS for Mathematics, Science and Engineering, 2nd Ed, 1992
% Prentice Hall, Englewood Cliffs, New Jersey, 07632, U.S.A.
% Prentice Hall, Inc.; USA, Canada, Mexico ISBN 0-13-624990-6
% Prentice Hall, International Editions: ISBN 0-13-625047-5
And the topic is explored a little at
It has to do with Newton Interpolating polynomials.
At the moment I do not understand how the code works, but I would expect that the Numerical Methods text would go into it further.
  1 件のコメント
PULAK Kumer
PULAK Kumer 2020 年 12 月 7 日
Please tell.me following statement's details C=conv(C,poly(x(k)))

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by