This is my script:
a=9; b=2; [varargout] = myfunc(a,b) c=varargout function [varargout] = myfunc(a,b) sum=a+b; dif=a-b; prod=a*b; varargout={sum,dif,prod} end
After execution, the value of c is 11. I want it to be an array, with values 11, 7, 18. {sum, dif,prod}. What is wrong with my script, and how can I get the desired array?
Best Answer