Error while using Symsum

11 ビュー (過去 30 日間)
REEMA MOHANTY
REEMA MOHANTY 2020 年 11 月 3 日
コメント済み: REEMA MOHANTY 2020 年 11 月 3 日
Error using sym/symsum (line 54)
Unable to compute sum with respect to '1'. Summation index must be a symbolic variable.
Error in TIMEVARRYINGMAIZECOBSON2112020 (line 175)
fvalue(1,s) = symsum(f5,s,0,g1)- symsum(f2,s,0, 1)-symsum(f3,s,0, 1)-symsum(f4,s,0, g1) %-symsum(f5,0, gbest(1,s));
here the value of g1= gbest(s,1)

採用された回答

Walter Roberson
Walter Roberson 2020 年 11 月 3 日
Your variable s has value 1, but what you pass in the second position for symsum() must be a scalar symbolic variable.
  1 件のコメント
REEMA MOHANTY
REEMA MOHANTY 2020 年 11 月 3 日
Okay.I will check that.
Thank you.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by