Difference between revisions of "Software tutorial"

From Process Model Formulation and Solution: 3E4
Jump to navigation Jump to search
m
m
 
(19 intermediate revisions by the same user not shown)
Line 9: Line 9:
# [[Software tutorial/Vectors and arrays|Vectors and arrays]] (used for [[Tutorial_3_-_2010|tutorial 3]])
# [[Software tutorial/Vectors and arrays|Vectors and arrays]] (used for [[Tutorial_3_-_2010|tutorial 3]])
# [[Software_tutorial/Matrix_operations|Matrix operations]] (used for [[Tutorial_4_-_2010|tutorial 4]])
# [[Software_tutorial/Matrix_operations|Matrix operations]] (used for [[Tutorial_4_-_2010|tutorial 4]])
# [[Software_tutorial/Functions as objects|Functions as objects]] (used for [[Tutorial_5_-_2010|tutorial 5]] to find the zero of a function)
# [[Software_tutorial/Creating and saving plots|Creating and saving plots]] : important for all remaining assignments, and the take-home exam.
# [[Software_tutorial/Integration of ODEs|Integrating ODEs]]: a tutorial on integrating ODEs in MATLAB and Python
# [[Software_tutorial/Least squares modelling (linear regression)|Least squares modelling]]: a tutorial on (linear regression) in MATLAB and Python
# [[Software_tutorial/Loading data in MATLAB or Python| Loading data in MATLAB or Python]] from Excel, CSV and XML files


''Coming soon'':
* Matrix operations: LU decomposition, matrix inverse, norms and condition numbers
* Generating and saving figures (plots)
* Want tutorials on other topics: please [mailto:kevin.dunn@connectmv.com email me]  
* Want tutorials on other topics: please [mailto:kevin.dunn@connectmv.com email me]  
== Need some more help? ==
== Need some more help? ==


Line 25: Line 26:
|-
|-
| width="50%" valign="top" |
| width="50%" valign="top" |
* [http://modelling3e4.connectmv.com/mediafiles/mediawiki/7/7c/MATLAB_primer.pdf MATLAB primer - a guide to MATLAB] by Dr. Prashant Mhaskar.
* [[media:MATLAB_primer.pdf | MATLAB primer - a guide to MATLAB]] by Dr. Prashant Mhaskar]]
* [http://modelling3e4.connectmv.com/mediafiles/mediawiki/8/80/Introduction_to_MATLAB_presentation.pdf Introduction to MATLAB] - a presentation to the 2009 CHE 3E04 class by Elliot Cameron and Eric Rodger
* [[media:Introduction_to_MATLAB_presentation.pdf | Introduction to MATLAB]] - a presentation to the 2009 CHE 3E04 class by Elliot Cameron and Eric Rodger
* [http://www.mathworks.com/help/pdf_doc/matlab/getstart.pdf Getting started with MATLAB 7] - a guide from the MathWorks.
* [http://www.mathworks.com/help/pdf_doc/matlab/getstart.pdf Getting started with MATLAB 7] - a guide from the MathWorks.
* [http://www.math.ufl.edu/help/matlab-tutorial/matlab-tutorial.html Online MATLAB tutorial]: An MATLAB tutorial from the University of Florida.
* [http://www.math.ufl.edu/help/matlab-tutorial/matlab-tutorial.html Online MATLAB tutorial]: An MATLAB tutorial from the University of Florida.
Line 34: Line 35:


* [http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_3 The non-programmer's guide to Python]
* [http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_3 The non-programmer's guide to Python]
* [http://www.pasteur.fr/formation/infobio/python An introductory guide to Python] - for biologists, but very readable
* [http://johnstachurski.net/lectures/index.html Python for computational economics] - but the first chapters are an excellent intro to Python
* Use the money you saved from not buying MATLAB to buy [http://www.amazon.ca/Learning-Python-Powerful-Object-Oriented-Programming/dp/0596158068 this book on Learning Python], or read [http://books.google.com/books?id=1HxWGezDZcgC&printsec=frontcover&dq=%22Learning+Python%22&source=bl&ots=LiMh3Ka7uW&sig=_z8u8gSW7z3hiE7vKrnX8pA3tNo&hl=en&ei=azWWTODQF8qdnAeyjLXDCA&sa=X&oi=book_result&ct=result&resnum=6&ved=0CDoQ6AEwBQ#v=onepage&q&f=false the Google Books version].
* Use the money you saved from not buying MATLAB to buy [http://www.amazon.ca/Learning-Python-Powerful-Object-Oriented-Programming/dp/0596158068 this book on Learning Python], or read [http://books.google.com/books?id=1HxWGezDZcgC&printsec=frontcover&dq=%22Learning+Python%22&source=bl&ots=LiMh3Ka7uW&sig=_z8u8gSW7z3hiE7vKrnX8pA3tNo&hl=en&ei=azWWTODQF8qdnAeyjLXDCA&sa=X&oi=book_result&ct=result&resnum=6&ved=0CDoQ6AEwBQ#v=onepage&q&f=false the Google Books version].
* This [http://diveintopython.org/ excellent book - Dive into Python] is available in print, and on the web.
* This [http://diveintopython.org/ excellent book - Dive into Python] is available in print, and on the web.
* Are you comfortable with MATLAB? This [http://www.scipy.org/NumPy_for_Matlab_Users guide to NumPy for MATLAB users] explains how to transition to Python. This [http://mathesaurus.sourceforge.net/matlab-numpy.html page shows how to translate] between MATLAB and Python.
* Are you comfortable with MATLAB?  This [http://mathesaurus.sourceforge.net/matlab-numpy.html page shows how to translate] between MATLAB and Python.
* A good [http://www.springerlink.com/content/978-3-540-73915-9 book for computational and engineering work] - free access from McMaster computers.
* A good [http://www.springerlink.com/content/978-3-540-73915-9 book for computational and engineering work] - free access from McMaster computers.
* Of course we need a link to [http://docs.python.org/tutorial/ the official Python tutorial] - but it is more general.
* We need a link to [http://docs.python.org/tutorial/ the official Python tutorial] - but it is more general.
* And finally, maybe [http://xkcd.com/353/ this cartoon will convince you]?
|}
|}

Latest revision as of 10:28, 15 September 2018

This tutorial will expand as we progress in the course. Each section has notes for both MATLAB and Python.

  1. About the course software
  2. Software installation
  3. Getting started
  4. My first program (required for tutorial 1)
  5. for loops and while loops (required for tutorial 1)
  6. Scripts and functions (useful for tutorial 2)
  7. Vectors and arrays (used for tutorial 3)
  8. Matrix operations (used for tutorial 4)
  9. Functions as objects (used for tutorial 5 to find the zero of a function)
  10. Creating and saving plots : important for all remaining assignments, and the take-home exam.
  11. Integrating ODEs: a tutorial on integrating ODEs in MATLAB and Python
  12. Least squares modelling: a tutorial on (linear regression) in MATLAB and Python
  13. Loading data in MATLAB or Python from Excel, CSV and XML files
  • Want tutorials on other topics: please email me

Need some more help?

Not every aspect about MATLAB or Python can be covered with our tutorial (above). Here are some additional resources.

MATLAB Python