This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Rutgers University SOE 14:440:127 Recitation 3 Input what variable to store the information in what information should be displayed to the screen in order to prompt the user >>money = input('Please enter how much money to withdraw: '); Rutgers University SOE 14:440:127 Recitation 3 Creating Vectors and Matrices Row vector row_vec = [ 2 3 4 6 ]; Column vector column_vec = [ 2; 5; 9; 10]; Matrices Matrix = [ 3 6 7 ; 8 9 20] Note: Whenever we talk about the size of Matrices, the number of rows always comes first. Rutgers University SOE 14:440:127 Recitation 3 Length/Size of a Vector/Matrix Function size(). [ r c ] = size(m); r returns the number of rows, c returns the number of columns of the matrix. Function length() % assume X is a vector, or a Matrix where only one dimension matters l = length(X) Rutgers University SOE 14:440:127 Recitation 3 Special vectors and matrices colon % it is a vector....
View Full
Document
 Fall '09
 blase

Click to edit the document details