ENGR 101 Lecture Notes - Lecture 2: Mexican Peso, Hypotenuse
Document Summary
A program - a sequence of statements that give instructions for the computer to execute. Variables - used to store data, named with letters or _ . Assignment - statements to store a value into a variable. Script - sequence of expressions that you write beforehand and run all at once help operator - tells you the function of this operator. Whos - gets info about a variable including the data it currently stores. % - comments out anything after this symbol mod(a,b) - modulo function, returns the remainder of a/b. Name size bytes class attributes a = hello world ; display(a); whos; Vector - a 1-d sequence of numbers or elements, use [], with , or as separators. Matrix - a 2-d grid of numbers or elements, use [], rows separated by ; Vector indexing - each element in a vector has an index, starting with 1.