help-octave
[Top][All Lists]
Advanced

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

Re: Integration with quad


From: Søren Hauberg
Subject: Re: Integration with quad
Date: Wed, 09 Dec 2009 20:42:29 +0100

ons, 09 12 2009 kl. 20:07 +0100, skrev Thomas Göbel:
> i want to integrate the following function:
> 
> function y = rect(t)
> if t<=0.5
>     rect=1
> else
>     rect=0
> end
> endfunction

Your return value is called 'y', but you never define this in your
function. Try something like

function y = rect(t)
  if t<=0.5
    y=1
  else
    y=0
  endif
endfunction

Søren



reply via email to

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