Hello everyone,
the example code
syms xcontinuous_function = x^2+x;matlabFunction(continuous_function,'Vars',x)
gives me the anonymous function
@(x)x+x.^2
I would like a similar result for piecewise functions. However, the code
syms xpiecewise_function = piecewise( 0<x<1, x, 'otherwiseVal', 0 );matlabFunction(piecewise_function,'Vars',x)
does not work.
Thanks for any help!
Best Answer