expr =
Hi Clara,
Yes, you can create a function in MATLAB that returns another function (a function handle to be precise) as its output. Here is the example code to get you started:
a = 10 % Sample input
bb = createQuadraticFunction(a) % bb stores the function handle
bb(10) % Checking the use of function handle
function f = createQuadraticFunction(a)
% This function returns a quadratic function f(x) = a*x^2
f = @(x) a * x.^2;
end
Refer to the following MathWorks documentation for more information on function handles: