Mercurial > forge
changeset 2581:4f687ef2db5f octave-forge
small modification.
author | sis-sou |
---|---|
date | Wed, 04 Oct 2006 20:53:12 +0000 |
parents | 211c0aebba29 |
children | 69369af7112b |
files | main/specfun/inst/heaviside.m |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/main/specfun/inst/heaviside.m Wed Oct 04 20:51:44 2006 +0000 +++ b/main/specfun/inst/heaviside.m Wed Oct 04 20:53:12 2006 +0000 @@ -22,8 +22,6 @@ if (nargin != 1) usage ("heaviside(x)"); endif - y = x; - y(x>0) = 1.; - y(x<0) = 0.; - y(x==0) = NaN; + y = double(x>0); + y(x==0) = NaN; endfunction; \ No newline at end of file