Author: | Peter Kattan | ISBN: | 9781301517800 |
Publisher: | Peter Kattan | Publication: | August 16, 2012 |
Imprint: | Smashwords Edition | Language: | English |
Author: | Peter Kattan |
ISBN: | 9781301517800 |
Publisher: | Peter Kattan |
Publication: | August 16, 2012 |
Imprint: | Smashwords Edition |
Language: | English |
This concise article of thirty pages takes you on a short tour on how to write small programs using MATLAB. The presentation covers both script files and function files. Several programming constructs are illustrated with simple examples. Loops are discussed using the For and While loops, while decisions are implemented using the If Else and Switch Case constructs. At the end of the presentation, a simple example is presented to show symbolic computing with the If Else statement. The presentation is made in the form of solved examples showing the exact MATLAB commands used and the output. At the end of the article, there are about eleven unsolved exercises for students to practice. The solutions to all the exercises are also provided. This article is taken form the bestselling book “MATLAB for Beginners: A Gentle Approach.” The material presented is not intended to be comprehensive or exhaustive but merely an introduction to programming using MATLAB.
This concise article of thirty pages takes you on a short tour on how to write small programs using MATLAB. The presentation covers both script files and function files. Several programming constructs are illustrated with simple examples. Loops are discussed using the For and While loops, while decisions are implemented using the If Else and Switch Case constructs. At the end of the presentation, a simple example is presented to show symbolic computing with the If Else statement. The presentation is made in the form of solved examples showing the exact MATLAB commands used and the output. At the end of the article, there are about eleven unsolved exercises for students to practice. The solutions to all the exercises are also provided. This article is taken form the bestselling book “MATLAB for Beginners: A Gentle Approach.” The material presented is not intended to be comprehensive or exhaustive but merely an introduction to programming using MATLAB.