Is it possible to convert symfun to sym?

63 visualizaciones (últimos 30 días)
Josh McCaffrey
Josh McCaffrey el 1 de Abr. de 2015
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.

Respuesta aceptada

Christopher Creutzig
Christopher Creutzig el 20 de Nov. de 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 comentarios
Jawad Bdour
Jawad Bdour el 13 de Dic. de 2018
Thank you very much, your answer really helped me!
José Lindoro Fonseca Fierro
José Lindoro Fonseca Fierro el 21 de Nov. de 2019
It really helped me a lot! Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Formula Manipulation and Simplification en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by