how to write this summation in matlab form ∑_(u=1)^(su-2)?

in this summation..the lower limit is u=1 and the upper limit is su-2. how can i write this summation limits in matlab form?

1 件のコメント

Greg Heath
Greg Heath 2012 年 10 月 8 日
Please write the complete mathematical command that is to be translated to MATLAB code

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

 採用された回答

Walter Roberson
Walter Roberson 2012 年 10 月 8 日

0 投票

If you have the symbolic toolbox, use symsum()
syms u
symsum(YourExpression, u, 1, su-2)
If you do not have the symbolic toolbox, then either use a for loop that accumulates the results, or else use an expression that calculates each term independently and then sum() them together. You could also consider using arrayfun()
arrayfun(@(u) YourExpression, 1:su-2)

5 件のコメント

Dhines
Dhines 2012 年 10 月 9 日
i'm using MATLAB R2009b. in this symbolic toolbox is present r not?
Walter Roberson
Walter Roberson 2012 年 10 月 9 日
The Symbolic Toolbox is an optional extra-cost add-in for all MATLAB licenses, with the exception that the Student Version includes the license for the Symbolic Toolbox (which is not necessarily installed by default.)
Dhines
Dhines 2012 年 10 月 10 日
thanks
Rajnish kumar
Rajnish kumar 2015 年 2 月 16 日
But symsum shows error if we have summation of h(k)x(n-k) for k=1 to L; let L=10; Undefined function 'symsum' for input arguments of type 'double'.
Error: y(n)=symsum(h(r).*x(n-r),r,1,L);
SARSKOLIN FOSSO
SARSKOLIN FOSSO 2021 年 7 月 6 日
yes i had this error.....it is because symsum became the function

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

その他の回答 (1 件)

Sudhanshu Gaurav
Sudhanshu Gaurav 2021 年 4 月 7 日
編集済み: David 2021 年 4 月 7 日

0 投票

min K k=1 n +1 i=0 n +1 j=0 cijxijk

1 件のコメント

Walter Roberson
Walter Roberson 2021 年 4 月 7 日
編集済み: Walter Roberson 2021 年 4 月 7 日
I am not sure why your post did not show up; I will ask staff.
You posted
min K k=1 n +1 i=0 n +1 j=0 cijxijk

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

カテゴリ

ヘルプ センター および File Exchange で Introduction to Installation and Licensing についてさらに検索

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by