Thread Subject: Summation in Symbolic Math Toolbox

Subject: Summation in Symbolic Math Toolbox

From: Alex

Date: 21 Jun, 2009 05:05:03

Message: 1 of 2

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

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 :).

Subject: Summation in Symbolic Math Toolbox

From: Christopher Creutzig

Date: 23 Jun, 2009 12:09:51

Message: 2 of 2

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

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
symbolic math t... Alex 21 Jun, 2009 01:09:02
summation Alex 21 Jun, 2009 01:09:02
rssFeed for this Thread

Contact us at files@mathworks.com