From: nuclph nuclph on
hi all,

say, i have the following recursion:

E(s) = d^2/(3d-2) + (3d-3)/(3d-2) E(s-1)
E(0) = 0

If I want to find E(10) i need to expend recursion which will be a sum or series.

Can you suggest is it possible to implement such thing in matlab?

Thank you.
From: Steven Lord on

"nuclph nuclph" <bskorodo(a)gmail.com> wrote in message
news:hrujac$fmm$1(a)fred.mathworks.com...
> hi all,
>
> say, i have the following recursion:
> E(s) = d^2/(3d-2) + (3d-3)/(3d-2) E(s-1)
> E(0) = 0
>
> If I want to find E(10) i need to expend recursion which will be a sum or
> series.
>
> Can you suggest is it possible to implement such thing in matlab?

Assuming d is a constant not the differential operator, use the FILTER
function or a FOR loop -- but remember that MATLAB uses _1_ based indexing,
not _0_ based, so your E(0) should actually be E(1).

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: nuclph nuclph on
thank you very much for an suggestions.

"Steven Lord" <slord(a)mathworks.com> wrote in message <hrukon$o55$1(a)fred.mathworks.com>...
>
> "nuclph nuclph" <bskorodo(a)gmail.com> wrote in message
> news:hrujac$fmm$1(a)fred.mathworks.com...
> > hi all,
> >
> > say, i have the following recursion:
> > E(s) = d^2/(3d-2) + (3d-3)/(3d-2) E(s-1)
> > E(0) = 0
> >
> > If I want to find E(10) i need to expend recursion which will be a sum or
> > series.
> >
> > Can you suggest is it possible to implement such thing in matlab?
>
> Assuming d is a constant not the differential operator, use the FILTER
> function or a FOR loop -- but remember that MATLAB uses _1_ based indexing,
> not _0_ based, so your E(0) should actually be E(1).
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>