MATLAB® by Example
eBook - ePub

MATLAB® by Example

Programming Basics

Munther Gdeisat, Francis Lilley

Share book
  1. 366 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

MATLAB® by Example

Programming Basics

Munther Gdeisat, Francis Lilley

Book details
Book preview
Table of contents
Citations

About This Book

MATLAB By Example guides the reader through each step of writing MATLAB programs. The book assumes no previous programming experience on the part of the reader, and uses multiple examples in clear language to introduce concepts and practical tools. Straightforward and detailed instructions allow beginners to learn and develop their MATLAB skills quickly.

The book consists of ten chapters, discussing in detail the integrated development environment (IDE), scalars, vectors, arrays, adopting structured programming style using functions and recursive functions, control flow, debugging, profiling, and structures. A chapter also describes Symbolic Math Toolbox, teaching readers how to solve algebraic equations, differentiation, integration, differential equations, and Laplace and Fourier transforms. Containing hundreds of examples illustrated using screen shots, hundreds of exercises, and three projects, this book can be used to complement coursework or as a self-study book, and can be used as a textbook in universities, colleges and high schools.

  • No programming experience necessary to learn MATLAB
  • Examples with screenshots and plentiful exercises throughout help make MATLAB easy to understand
  • Projects enable readers to write long MATLAB programs, and take the first step toward being a professional MATLAB programmer

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is MATLAB® by Example an online PDF/ePUB?
Yes, you can access MATLAB® by Example by Munther Gdeisat, Francis Lilley in PDF and/or ePUB format, as well as other popular books in Computer Science & Bioinformatics. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Elsevier
Year
2012
ISBN
9780124058538
1
Matlab Integrated Development Environment
Chapter Outline
Lesson 1.1 Basics of the Matlab Integrated Development Environment
Lesson 1.2 Matlab Script Files
Lesson 1.3 Matlab Editor—Cell Mode
Answers to Selected Exercises

Lesson 1.1 Basics of the Matlab Integrated Development Environment

Objectives
To familiarize beginners in Matlab with its programming environment.
To learn how to use Matlab to execute simple commands, create variables, and display their values.
Topics
1.1.1 Matlab Integrated Development Environment
1.1.2 Creating Scalar Variables
1.1.3 Creating Vector Variables
1.1.4 Creating Array Variables

1.1.1 Matlab Integrated Development Environment

Matlab version 7.12 (R2011a) is used here to explain the integrated development environment (IDE). Even though this specific version of Matlab has been used here, other Matlab versions can still be used to follow the discussions presented in this book if you do not have this exact version.
First launch Matlab. When MATLAB opens you should see four windows: the Command Window, the Command History, the Workspace, and the Current Folder. If you do not see these windows, you can direct Matlab to display them by going to the Menu→Desktop and then click the window you would like to display, so that it has a tick
image
next to it. For example, if you would like to display the Command Window, go to Menu→Desktop and then click the Command Window.
image
In addition to your ability to display the required windows, you can arrange them in any way you prefer. This can be achieved by clicking the title bar of any window, dragging it, and placing it in the required location within the Matlab main window.
Exercise 11
Display the four windows and arrange them as shown. Remember, the four windows are the Command Window, the Command History, the Workspace, and the Current Folder.
image

The superscript after the exercise number denotes the exercise difficulty level: 1 being basic, 2 intermediate, and 3 being an advanced task.
The Command Prompt>>” is displayed in the Command Window. When the Command Window is active, a blinking cursor appears to the right of the prompt. The cursor and the prompt signify that Matlab is ready to perform a computational operation.
The Workspace lists all the variables that you have created so far and their values. Other information is also displayed here, such as the maximum and minimum values of any variables that are created.
The Command History records all of the commands that you have previously typed at the Command Prompt. You can select one of these commands using the mouse and execute it in the Command Window by double-clicking it from within the Command History window.
Current Folder: You can direct Matlab to set up a folder of your choice to be a current folder. This will then be your working folder, where you can save yo...

Table of contents