Assign separate handles to function outputs
4 views (last 30 days)
I have a function that returns two outputs, the function value and its derivative. I'd like to create separate handles to the function value and the derivative. Is this possible?
For clarity, I'd like to do something like this:
function [f, fdx] = get_values(x)
f = @(x) get_values(x) %first output
g = @(x) get_values(x) %second output somehow, not sure how to do this