Unlike Matlab, Octave Symbolic has no piecewise function. Is there any work? I would like to do something like this:
syms x
y = piecewise (x0, 1)
Also, how to get pieces of piecewise function? I ran the following:
>> int (exp (-a * x), x, 0, t)
And I received the following correct answer, displayed and stored in a variable:
t for a = 0
-a * t
1 e
- - ----- otherwise
aa
But now I would like to access the โotherโ part of the answer so that I can process it. How can I do it?
(Yes, I can influence this in my head, but I train when more complex expressions appear. I am also really looking for an approach using symbolic expressions - although numerical numbers may work fine anyway, I want to understand the symbolic approach.)
Thanks!
octave
forkandwait
source share