function [a1,a2,a3,a4,a5] = nargouttest printf('nargout = %d\n',nargout); a1 = 1; a2 = 2; a3 = 3; a4 = 4; a5 = 5;