Say I have a anonymous function f = @(x) x^2
and I want to convert this to a symbolic function. Is there a built in command for that?
Asked
Active
Viewed 9,926 times
8

Will
- 4,241
- 4
- 39
- 48
-
1[`func2str`](http://www.mathworks.com/help/techdoc/ref/func2str.html)? – Ansari Jul 04 '12 at 04:35
1 Answers
11
You could just pass it to SYM:
f = @(x) x^2;
g = sym(f)
But then most of the symbolic functions do that automatically when they receive a function handle (subs
, int
, etc...)

Amro
- 123,847
- 25
- 243
- 454