フィルターのクリア

compute triple summation for my homework

1 回表示 (過去 30 日間)
androidguy
androidguy 2016 年 9 月 19 日
コメント済み: Walter Roberson 2016 年 9 月 21 日
hello guys
I have need to compute the following summation for my homework. Any hint or pseudo code would be helpful. Thanks.
Edit - "p" is a vector containing numbers and p(x) refers to the element position in that vector and "y" is a symbol

採用された回答

Walter Roberson
Walter Roberson 2016 年 9 月 19 日
Since y is a symbol, you will need to use the Symbolic Toolbox.
You might be tempted to use symsum() for this, but symsum has the limitation that symbolic variables cannot be used for indexing of arrays.
So... ndgrid, calculate the formula for each point, and then sum() along the dimensions until you get a scalar result.
  5 件のコメント
androidguy
androidguy 2016 年 9 月 20 日
My teacher said that it is okay to start the second summation from 1 instead of 0. Also how do i assign variables for each varying index? For example when x=1 and t=1, i need a variable like y11 and when x=2 and t=2 y22 and so on. How can i do this?
Walter Roberson
Walter Roberson 2016 年 9 月 21 日
y = sym('y', [3, 2]);
y(t, x)

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

その他の回答 (1 件)

androidguy
androidguy 2016 年 9 月 19 日
can anyone help me on this one please? i would really appreciate it

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by