help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unit sample sequence ->step


From: Jonathan C. Webster
Subject: Re: unit sample sequence ->step
Date: Sun, 06 Feb 2005 18:24:21 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2

Without the "for"s and "if"s try

retval = t > 0;


Jonathan


NZG wrote:
It does, my bad, I meant the unit step.

function retval = u(t)
for i = 1:length(t)
if (t(i) >= 0)
retval(i)=1;
else
retval(i)=0;
endif
endfor
endfunction






-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]