Functions in matlab -
this looks simple. want define function:
syms x
f = x^2
i want able f(4)
, spits out 16. want avoid having write new m-file.
when dealing symbolic variables, substitute in numeric value, use subs()
, i.e. symbolic substitution:
syms x f = x^2 subs(f,4)
Comments
Post a Comment