With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

Book Description

The text is for instructors who want to use MATLAB to teach introductory programming concepts. Since many students struggle with applying the concepts that underlie good programming practice, Learning to Program with MATLAB: Building GUI Tools was designed upon the observation that student learning is enhanced if the students themselves build the GUI (graphical user interface) tool, construct the computational model, implement the visualization of results, and design the GUI. This text teaches the core concepts of computer programming—arrays, loops, functions, and basic data structures—using MATLAB. The chapter sequence covers text-based programs, then programs that produce graphics, building up to an emphasis on GUI tools. This progression unleashes the real power of MATLAB—creating visual expressions of the underlying mathematics of a problem or design.

1. Coverpage
2. Titlepage
4. Dedication
5. Contents
6. Preface
7. I MATLAB Programming
1. 1 Getting Started
1. 1.1 Running the MATLAB IDE
2. 1.2 MATLAB variables
3. 1.3 Numbers and functions
4. 1.4 Documentation
5. 1.5 Writing simple MATLAB scripts
6. 1.6 A few words about errors and debugging
7. 1.7 Using the debugger
2. 2 Strings and Vectors
3. 3 Plotting
1. 3.1 The plot command
2. 3.2 Tabulating and plotting a simple function
3. 3.3 Bar graphs and histograms
4. 3.4 Drawing several plots on one graph
5. 3.5 Adding lines and text
4. 4 Matrices
1. 4.1 Entering and manipulating matrices
2. 4.2 Operations on matrices
3. 4.3 Solving linear systems: The backslash operator
4. 4.4 Special matrix functions
5. 5 Control Flow Commands
1. 5.1 Conditional execution: The if statement
2. 5.2 Logical expressions
3. 5.3 Logical variables
4. 5.4 for loops
5. 5.5 while loops
6. 5.6 Other control flow commands
6. 6 Animation
1. 6.1 Basic animation
2. 6.2 Animating function plots
3. 6.3 Kinematics of motion
7. 7 Writing Your Own MATLAB Functions
1. 7.1 MATLAB function files
2. 7.2 Function inputs and outputs
3. 7.3 Local workspaces
4. 7.4 Multiple outputs
5. 7.5 Function files
6. 7.6 Other functional forms
8. 8 More MATLAB Data Classes and Structures
8. II Building GUI Tools
1. 9 Building a Graphical User Interface
1. 9.1 Getting started with GUIDE
2. 9.2 Starting an action with a GUI element
3. 9.3 Communicating with GUI elements
4. 9.4 Synchronizing information with a GUI element
5. 9.5 Key points from this chapter
2. 10 Transforming a MATLAB Program into a GUI Tool
3. 11 GUI Components
1. 12 More GUI Techniques
1. 12.1 Waitbars
2. 12.2 File dialogs
3. 12.3 Reading and writing formatted text files
4. 12.4 The input dialog
5. 12.5 The question dialog
6. 12.6 Sharing application data between functions
7. 12.7 Responding to keyboard input
8. 12.8 Making graphic objects interactive
9. 12.9 Creating menus in GUIDE
2. 13 More Graphics
1. 13.1 Logarithmic plots
2. 13.2 Plotting functions on two axes
3. 13.3 Plotting surfaces
4. 13.4 Plotting vector fields
5. 13.5 Working with images
6. 13.6 Rotating composite objects in three dimensions
3. 14 More Mathematics
1. 14.1 Derivatives
2. 14.2 Integration
3. 14.3 Zeros of a function of one variable
4. 14.4 Function minimization
5. 14.5 Solving ordinary differential equations
6. 14.6 Eigenvalues and eigenvectors
10. Appendix A: Hierarchy of Handle Graphics Objects
11. Appendix B: Using LATEX Commands
12. Index