From: trung trinh on
I know i can use m file to define a function or another manner example
>> f = inline('x+1');
>> f(2)
then done well.
but if i only use
>> syms x;
>> f = x+1;
how to calculate value of function f at x = 1
From: Steven Lord on

"trung trinh" <trungkstn(a)gmail.com> wrote in message
news:hq1ql1$hta$1(a)fred.mathworks.com...
>I know i can use m file to define a function or another manner example
>>> f = inline('x+1');
>>> f(2)
> then done well.
> but if i only use
>>> syms x;
>>> f = x+1;
> how to calculate value of function f at x = 1
>

Use SUBS.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ