Re: Summation in Symbolic Math Toolbox
- From: Christopher Creutzig <Christopher.Creutzig@xxxxxxxxxxxxx>
- Date: Tue, 23 Jun 2009 14:09:51 +0200
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
.
- References:
- Summation in Symbolic Math Toolbox
- From: Alex
- Summation in Symbolic Math Toolbox
- Prev by Date: compiled code fails with UndefinedFunction error
- Next by Date: Re: compiled code fails with UndefinedFunction error
- Previous by thread: Summation in Symbolic Math Toolbox
- Next by thread: Message Alert - You Have 1 Important Unread Message!
- Index(es):
Relevant Pages
|
Loading