The following MATLAB script shows how to return multiple outputs in a single function:
myFun.m:
function [out1, out2, out3] = myFun(arg0, arg1)
out1 = arg0 + arg1;
out2 = arg0 * arg1;
out3 = arg0 - arg1;
end
terminal:
>> [res1, res2, res3] = myFun(...