how do I write sigma notation in matlab?

18 ビュー (過去 30 日間)
David Zhang
David Zhang 2016 年 10 月 12 日
回答済み: Walter Roberson 2016 年 10 月 12 日
how do I write sigma notation in matlab?

採用された回答

Walter Roberson
Walter Roberson 2016 年 10 月 12 日
You need the symbolic toolbox, and you use the symsum() function
Note, however, that symsum has the limitation that you cannot use symbols to index an array. For example you cannot say
A = [2 5 8];
syms k
symsum( k*A(k).^k, k, 1, 3)
If you need to index into an array as part of the formula, then MATLAB requires you to form the definite expressions and then sum() them:
K = 1 : 3;
sum( K .* A(K) .^ K )
Notice the array is not being indexed by a symbol here.

その他の回答 (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