필터 지우기
필터 지우기

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

조회 수: 10 (최근 30일)
Dhines
Dhines 2012년 10월 8일
댓글: SARSKOLIN FOSSO 2021년 7월 6일
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일
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
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일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by