example - for k = 1:rows % inner loop to travers columns...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%{ This program asks the user for a number of rows, and prints the pattern: * ** *** ...... depending on the number of rows wanted by user %} rows = input('How many rows? '); % outer loop to traverse rows
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for k = 1:rows % inner loop to travers columns for t = 1:k fprintf('*') % pring 1:rows starts end fprintf('\n') % after printing 1:rows starts % print a new line to sparate rows end...
View Full Document

This note was uploaded on 03/30/2011 for the course ENGINEERIN 127 taught by Professor Finch during the Spring '08 term at Rutgers.

Ask a homework question - tutors are online