Lab 3 CS100M/CIS121/EAS121 Spring 2004 1) Answer questions about Assignment 2 [10 min]. 2) A bit more MATLAB: [5 min]: - fprintf(STRING): output to the command window - '\n': inserts a new line in a string - show fprintf('hi\nbye') 3) Problem/steps for E3 [remaining time]: - download stars.p from Exercises - down readInt.m from Lectures (see Selection) - put both in Desktop - attempt to view stars.p with TYPE. You can't -- p-code is MATLAB's proprietary format -- helps to protect code. - run stars to see what it does. - write a MATLAB program stars.m that does exactly what stars.p does -- no arrays other than the indexing needed for for-loops. Notes: - readInt requires the inputs as readInt(LOW,HIGH,PROMPT) (try to run readInt before working on your solution) - spend time writing an algorithm! Do not blindly attempt to write your code -- you should draw a picture of a sample case, too - The TAs will help you with your MATLAB code ONLY IF you first show them a written algorithm.