summation of numbers

조회 수: 2 (최근 30일)
FIR
FIR 2012년 1월 7일
I have uploaded an file ,plz tell how to implement that formula

채택된 답변

Walter Roberson
Walter Roberson 2012년 1월 7일
Generally speaking, summation can be done through three standard methods:
  • initializing the result to 0, and looping over all of the possibilities, adding each term to the result
  • using sum()
  • using symsum() if you have access to the symbolic toolbox. This should be used only for formula and not for specific numeric values.
  댓글 수: 4
FIR
FIR 2012년 1월 7일
qir is the
number of samples with class i (i = 1,2,. . . ,S, and r = 1,2,. . . ,n)
Walter Roberson
Walter Roberson 2012년 1월 7일
So that would appear to be external information representable as an array. In that case the above code should work.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by