Simplifying a function handle using another function handle with partially given variable in Matlab

40 views Asked by At

With the following code in Matlab"

f = @(a,x) a*x+3;
g = @(x) f(4,x)

I get g as a function handle of the function handle f.

g = @(x)f(4,x)

However, I want to get g as a function handle without being expressed by another function handle, i.e., g = @(x)4*x+3. How can I get the simplified function handle?

0

There are 0 answers