MATLAB: Force “resolution” of imbricated handles

handlesMATLAB

Hello everyone,
Is there a way to force matlab to "resolve" a handle depending on a handle by replacing the "subhandle" by its expression?
Let me explain on a simple example. Say I define
>> f = @(x) x^2;
>> g = @(x) f(x) + 1;
Now if I type g matlab returns
g =
function_handle with value:
@(x)f(x)+1
Is there an instruction I can use to force matlab to replace f(x) by x^2 in the expression of g, and return
g =
function_handle with value:
@(x)x^2+1
?
Thank you for reading,
Nil

Best Answer

No.
However you can sometimes use symbolic toolbox and matlabFunction