summation of numbers

 Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de En. de 2012

1 voto

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 comentarios

FIR
FIR el 7 de En. de 2012
walter can u plz code for me using first method of urs,plz am struck here nearly 15 days
Walter Roberson
Walter Roberson el 7 de En. de 2012
The formula for qir did not come out in what I was able to read.
If qir was a matrix q(i,r) then I would code as
yt = M * ceil(sum(q(:).^2) ./ (Miplus * Mplusr) - 1) ./ log(n);
FIR
FIR el 7 de En. de 2012
qir is the
number of samples with class i (i = 1,2,. . . ,S, and r = 1,2,. . . ,n)
Walter Roberson
Walter Roberson el 7 de En. de 2012
So that would appear to be external information representable as an array. In that case the above code should work.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by