[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Piecewise function in octave
From: |
Ivan Sutoris |
Subject: |
Re: Piecewise function in octave |
Date: |
Thu, 16 Oct 2008 00:34:45 +0200 |
Hi
.* operator is used for element by element multiplication (otherwise,
* itself would mean matrix multiplication). Also other operators with
'dot' (like .^ ./ ) operate element-wise.
If you need to define piecewise (or any other) function, why not write
separate m-file for it?
Regards
Ivan Sutoris
On Wed, Oct 15, 2008 at 11:42 PM, genehacker <address@hidden> wrote:
>
> Hi Carlo,
>
> Can you please tell what .* do to the equation. Also how would you write
> a generalised piecewise function like
>
> f(t) = a(t) t < t0
> b(t) t = t0
> c(t) t > t0
>
> thanks in advance,
> k3.