Is it possible to convert symfun to sym?

73 次查看(过去 30 天)
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.

采纳的回答

Christopher Creutzig
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Formula Manipulation and Simplification 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by