Username:

lylec

Hey,

Attached to this email I have attached three functions which I consider
useful in octave. I'm not sure whether they are adequately coded, but no
worries if they are not. The general idea of each function is as follows:

y = recur(a, b, x, x0, y0) : Returns a vector equal in length to that of x,
which is the solution to a causal discrete system equation, where x is the
input and y the output. 'a' and 'b' corresponds to the coefficients of y and
x respectively, given that the equation is of following form:

y[n] = a(0)y[n-1] + a(1)y[n-2] + ... + b(0)x[n] + b(1)x[n-1] + ....

x0 and y0 are the intial conditions.

y = upulse(t,t0): Returns vector equal in length to t and defined as y(t) =
0 if t != t0, y(t) = 1 if t = t0.

y = uramp(t,t0): Returns vector equal in length to t and defined as y(t) = 0
if t < t0, y(t) = t if t >= t0.

y = ustep(t,t0): Returns vector equal in length to t and defined as y(t) = 0
if t < t0, y(t) = 1 if t >= t0.

I hope these functions are of some use.
Lyle

Attachment: recur.m
Description: Mathematica Notebook document

Attachment: upulse.m
Description: Mathematica Notebook document

Attachment: uramp.m
Description: Mathematica Notebook document

Attachment: ustep.m
Description: Mathematica Notebook document

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to