Is it possible to convert symfun to sym?
26 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Josh McCaffrey
am 1 Apr. 2015
Kommentiert: José Lindoro Fonseca Fierro
am 21 Nov. 2019
I have a variable x that is of class symfun and I want to convert it to class sym. Unfortunately I can't post the code because there are a ton of custom functions. I found that the code x=x(1,1) works when x is a two dimensional vector but that is not always the case.
0 Kommentare
Akzeptierte Antwort
Christopher Creutzig
am 20 Nov. 2017
Symfun is a subclass of sym, so, yes, a symfun is already a sym.
To get only the body of the function, use formula or call the symfun:
syms x(t)
x(t) = t^2 - t;
formula(x)
% or:
x(t)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numeric Types finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!