フィルターのクリア

Undefined function 'symsum' for input arguments of type 'double'.

1 回表示 (過去 30 日間)
bus14
bus14 2019 年 5 月 8 日
コメント済み: Walter Roberson 2019 年 5 月 8 日
Hi, I am getting the error
Undefined function 'symsum' for input arguments of type 'double'.
Error in LoopsumQ2 (line 40)
T=symsum(Q,k,1,200)
I do not understand what this means as I am trying to sum this objective function.
The values of l,q,s,pk(k),y(k),z(k) are all computed already before this for loop takes place.
Is there something wron in my code?
syms k
for k=1:1:200;
Q=pk(k)*((l-q).'*z(k)-s.'*y(k));
T=symsum(Q,k,1,200)
end
  7 件のコメント
bus14
bus14 2019 年 5 月 8 日
編集済み: bus14 2019 年 5 月 8 日
l=1 q=11 s=2
this is is simplied version of the larger problem
Walter Roberson
Walter Roberson 2019 年 5 月 8 日
If those are constant then the .' operators have no reason to be there so I have to assume that they are vector or 2D array in the real problem. The solution if they are constant is very simple but with them being multivalued I need to think carefully about putting the expression together.

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

回答 (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