An octave/MATLAB u(t) function example

From Class Wiki
Revision as of 20:08, 2 November 2016 by Frohro (talk | contribs) (Frohro moved page A u(t) function example to An octave/MATLAB u(t) function example: To make the front page more uniform)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To make a unit step function in Octave, put the following in a file called u.m. This also works in MATLAB.

function junk = u(time)
junk=.5*(sign(time)+1);
endfunction