summation of numbers

2 vues (au cours des 30 derniers jours)
FIR
FIR le 7 Jan 2012
I have uploaded an file ,plz tell how to implement that formula

Réponse acceptée

Walter Roberson
Walter Roberson le 7 Jan 2012
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 commentaires
FIR
FIR le 7 Jan 2012
qir is the
number of samples with class i (i = 1,2,. . . ,S, and r = 1,2,. . . ,n)
Walter Roberson
Walter Roberson le 7 Jan 2012
So that would appear to be external information representable as an array. In that case the above code should work.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by