Re: Summation in Symbolic Math Toolbox



Alex wrote:
I understand how to implement a basic summation symbolically in MATLAB, but what if I have something of the form:

Sum_[k=1]^[n]Sum_[j=1 , j~=k]^[n] i^j

You probably mean k^j, not i^j, right?

I just need to know how to deal with the "j~=k" part when using the "symsum" command in the Symbolic Math Toolbox. Any help would be greatly appreciated :).

You've got at least three options, of which I find the first one the
least promising and the worst from an aesthetic point of view: You could
multiply the summand with (1-kroneckerDelta(j, k)), or use two sums, one
from 1 to k-1 and the other from k+1 to n, or sum away and subtract the
term for k=j (assuming it is, as in this case, a defined value). symsum
does not have a generic way of passing in conditions beyond the range to
use, I believe.


Christopher
.



Relevant Pages

  • Re: Recurrence relation, part 2
    ... Alex wrote: ... > I have managed to unite 2 sums into one and to derive the following ... "Finite Difference Equations" by Levy and Lessman republished in 1992 by ...
    (sci.math.research)
  • Re: MSCEs... grr!
    ... >> Subject pretty much sums it all up, folks. ... > Failed the exam again, ... What, exactly, do you have against Alex? ...
    (uk.misc)
  • Re: New Fall Season So Far
    ... Alex W wrote: ... I'll take a peek this week. ... Appointment TV: ... That there sums it up nicely. ...
    (rec.arts.tv)
  • Recurrence relation, part 2
    ... I have managed to unite 2 sums into one and to derive the following ... multi-dimensional recurrence relation. ... Alex ...
    (sci.math.research)

Loading