Hi there,
I have a function nested inside another function. How can I get the main function to return the output of the nested function so that I can see it in the workspace? I want to the "fval" as an output below.
Thank you
function [output1,output2] = OptimiseEnergy(input1,input2,input3,input4)% do stuff with inputs 1-4
[x, fval] = linprog(obj_vec, a, b,[],[],lb,ub,x0,options)end
Best Answer