for i = (1:5) output = []; for j = (1:i) output = [output '*']; end disp(output); end