This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS1112 Discussion (Lab) 1 When you have completed the lab, show this sheet and any associated programs to your lab instructor, who will record that you have completed the lab. If you do not finish this exercise during the lab, show the instructor what you have done at the end of the lab and be sure to complete it in the next few days. If you have any questions, ask your lab instructor or a consultant immediately! They are in the lab to help you learn the material. 1 Matlab built-in functions... fun with Matlab Matlab provides numerous built-in variables and functions. For each line below, type the text in the Command Window and press < Enter > to see what happens. Is the result what you expect? Fill in the blanks below with the screen output for that line. % This is a comment--no action is executed by the computer % From this point on, read but do not type the text after the % symbol in a line. % Variables, constants, and simple calculations: a= 100 % Look at the Workspace Pane: a VARIABLE called a has been created b= 99 % Look at the Workspace Pane: a VARIABLE called b has been created format compact a/b % _____________________________ ans y= ans % _____________________________ format long y format short y p=(3*2)^2 q=(3*2)^2; % Did you type the semi-colon?% Did you type the semi-colon?...
View Full Document
This note was uploaded on 09/05/2011 for the course CS 101 at Cornell University (Engineering School).