what's the difference between f and f(x) in matlab?

here is our inline function
syms x
f=inline(char(x^2));
and i want to make a new function g=sqrt(f) i.e. i want to make a new function abs(x).
so i type g=inline(char(sqrt(f))).
But it doesn't work and matlab says that 'Undefined function 'sqrt' for input arguments of type 'inline'
so i type g=inline(char(sqrt(f(x)))).
then, MATLAB accept my function g.
i don't know what is the difference between f and f(x) :(

 Accepted Answer

To know the difference type
whos f
d=f(x)
whos d

2 Comments

WOW!!!! Thank you very much :D
Amazing! this will help alot with Matlab.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!