From: anant on
We have made the function like:

function R=summation(m)
syms k;
R=symsum('u[k].u[m-k]',k,0,m);

When we call this function:
Suppose summation(7) it returns
ans=u[0].u[m]+u[1].u[m-1]+u[2].u[m-2]+u[3].u[m-3]+u[4].u[m-4]+u[5].u[m-5]+u[6].u[m-6]+u[7].u[m-7]

It does not take the value of m inside the string.
How can we debug it.I am using Matlab Symbolic toolbox.
From: Walter Roberson on
anant wrote:
> We have made the function like:
>
> function R=summation(m)
> syms k;
> R=symsum('u[k].u[m-k]',k,0,m);
>
> When we call this function:
> Suppose summation(7) it returns
> ans=u[0].u[m]+u[1].u[m-1]+u[2].u[m-2]+u[3].u[m-3]+u[4].u[m-4]+u[5].u[m-5]+u[6].u[m-6]+u[7].u[m-7]
>
>
> It does not take the value of m inside the string.
> How can we debug it.I am using Matlab Symbolic toolbox.

R = subs(symsum('u[k].u[m-k]',k,0,m));