Using loop to solve a same equations

5 ビュー (過去 30 日間)
Khang Nguyen
Khang Nguyen 2019 年 5 月 19 日
回答済み: Saumya Goel 2019 年 5 月 22 日
Hey everyone,
I got p0 = [1 2 3 4 5 6];
p10 = [ 3 4 5 6 7 8];
p20 = [3 4 2 5 6 7];
and f0 = @(x) = p0(1)*x^6 + p0(2)*x^5 + .... + p0(6)*x^0
and same for f10 (corressponding is p10), and f20
How can I make a loop for this ?
Thanks in advance
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 5 月 19 日
Don't bother. Use polyval()

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

回答 (1 件)

Saumya Goel
Saumya Goel 2019 年 5 月 22 日
As mentioned by Walter, you may consider trying "Polyval". Please refer to this documentation link for more information: https://www.mathworks.com/help/matlab/ref/polyval.html

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by