Lets say I have a function:
function [ A, B, C ] = test(x, y, z)
A=2*x;
B=2*y;
C=2*z;
end
When you press run, Matlab returns on
MATLAB will automatically ouput the variables/expressions those are not end with a ';'.
So if you just need to display all these values, the simplest way will be:
function [ A, B, C ] = test(x, y, z)
A=2*x % no ';' will print A's value automatically
B=2*y % no ';' will print B's value automatically
C=2*z % no ';' will print C's value automatically
end