How to use function like `min` in symfun?(I got an error)
Afficher commentaires plus anciens
For example, i want to create a symbolic function: f(x,y) = min(x-1,y+1);
when f(x,y) = x+y, everything is ok, but when it comes to min, error occured.
syms x y
f = symfun(min([x-1 y+1])),[x y])
I got error like this:
"Unable to convert expression into double array."
Help...
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 26 Avr 2020
syms x y
f = symfun(piecewise(x-1<=y+1, x-1, y+1),[x y])
1 commentaire
Liming Fang
le 26 Avr 2020
Catégories
En savoir plus sur Assumptions dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!