n=input('How many rows for right justified triangle do you want ');
for i=1:n
str = [blanks(n-i) repelem('*',1,i)] ;
fprintf('%s\n',str) ;
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!