|
From: | Carlo de Falco |
Subject: | Re: Piecewise function in octave |
Date: | Wed, 15 Oct 2008 22:14:53 +0100 |
On 15/ott/08, at 21:57, genehacker wrote:
Hi,I am looking for a code that can specify a function f(t) piecewise, i.e. that can be defined according to intervals based on value of t. I want tointegrate one of these in an anonymous function g(x,t). f(t) = sin(t) t<pi 0 t>=pi cheers k3
to implement the example above you could use f = @(t) sin(t) .* (t<pi) ; c.
[Prev in Thread] | Current Thread | [Next in Thread] |