Presentation is loading. Please wait.

Presentation is loading. Please wait.

March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Vectors and DimensionsVectors and Dimensions Scripts (shell scripts)Scripts.

Similar presentations


Presentation on theme: "March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Vectors and DimensionsVectors and Dimensions Scripts (shell scripts)Scripts."— Presentation transcript:

1 March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Vectors and DimensionsVectors and Dimensions Scripts (shell scripts)Scripts (shell scripts) Import/Export of numerical matricesImport/Export of numerical matrices Working with parts of matricesWorking with parts of matrices Matlab #3: Exercise 5.1Matlab #3: Exercise 5.1

2 March 2005 2R. Smith - University of St Thomas - Minnesota Vectors and Dimensions # of people in a house (village vector)# of people in a house (village vector) Rows versus columnsRows versus columns Mixed math:Mixed math: –Scalar > < Vector –Vector > < Vector TransposeTranspose Adding and removing ([] and ‘end’)Adding and removing ([] and ‘end’) find() – indices of booleans that are ‘true’find() – indices of booleans that are ‘true’

3 March 2005 3R. Smith - University of St Thomas - Minnesota Scripts Just save a series of Matlab commands in a fileJust save a series of Matlab commands in a file Give it a.m suffixGive it a.m suffix Refer to it by name inside Matlab as a ‘command’Refer to it by name inside Matlab as a ‘command’ Use % as comment marker (like //)Use % as comment marker (like //) Functions are different – we’ll get to that laterFunctions are different – we’ll get to that later

4 March 2005 4R. Smith - University of St Thomas - Minnesota Import/Export of Matrices New population vectorNew population vector –Row 1 = #people in a house –Row 2-5 = four highest ages of people in a house Using Excel to type in a matrixUsing Excel to type in a matrix Using TextpadUsing Textpad Importing/ExportingImporting/Exporting

5 March 2005 5R. Smith - University of St Thomas - Minnesota Parts of Matrices Try town(:,1), town(1,:), town(2:end,:)Try town(:,1), town(1,:), town(2:end,:)

6 March 2005 6R. Smith - University of St Thomas - Minnesota Matlab #3 Exercise 5.1, p. 108Exercise 5.1, p. 108 E-mail me the scriptE-mail me the script

7 March 2005 7R. Smith - University of St Thomas - Minnesota Creative Commons License This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by- sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.


Download ppt "March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Vectors and DimensionsVectors and Dimensions Scripts (shell scripts)Scripts."

Similar presentations


Ads by Google