Download presentation

Presentation is loading. Please wait.

1
Exam #3 Review: Comprehensive Exam Class 14.2 Palm Matlab Book Ch. 1-5

2
Exam #3: Comprehensive Exam Thursday, December 2, 2004 6:30 - 8:00 pm Bright 124 Bring: Pencil, calculator, and graphics pack Turn in: Completed group project and team evaluation form (separately).

3
Chapter 1: Matlab file commands and command window management Order of operations On-line help Matlab editor Comments Legal file names Difference between script and function files

4
Chapter 2: Arrays (creation, indexing, editing) find(), linspace(), max(), min(), size(), sort(), sum() Array operations or element-by-element operations (.*,./,.^, +, -) Matrix operations Multiplication, addition, subtraction, coefficients cross(), dot() Polynomial commands conv(), deconv(), poly(), polyval(), roots()

5
Chapter 2, continued: Cell arrays Know two methods for creating/editing data Store mixed data types Structure arrays Data structure with named fields structure(rec_num).field

6
Chapter 3: Built-in math functions exp(), sqrt(), log(), log10(), cos(), sin() fzero(), fminsearch() Importing data

7
Chapter 3, continued: User-defined functions: function [outputs] = f_name(inputs) Store as f_name.m Use as in: >> [outputs] = f_name(inputs) Variables in function are local (deleted after function finishes) unless defined as global

8
Chapter 4: Relational operators >, =, <=, ==, ~= Logical operators ~, &, &&, |, ||, xor() Order of operations (), ^ * /, + -, > < …, &, |

9
Chapter 4, continued: If – structure if logical 1 Block 1 elseif logical 2 Block 2 else Block 3 end

10
Chapter 4, continued: Switch – structure Switch switch_var Case value 1 Block 1 Case value 2 Block 2 Otherwise Block 3 end

11
Chapter 4, continued: For – loops for loop_var = m:s:n Block Loop_var = … % NOT ALLOWED A(loop_var) = … % ALLOWED … = Loop_var … % ALLOWED end

12
Chapter 4, continued: While – loops While logical statement Block Something that changes logical statement end

13
Chapter 4, continued: Flow control commands break, continue

14
Chapter 5: Basic plotting commands plot(), axis(), xlabel(), ylabel(), title(), text() grid on, hold on, grid off, hold off Different plot types plot(), loglog(), semilogy(), semilogx() Different symbol types ‘bo-’, ‘o--’, ‘.-’, ‘b’, ‘o’, etc.

15
Chapter 5, continued: Three-dimensional plots mesh(), surf(), contour(), plot3() [x, y] = meshgrid(x, y) Z = x.*x, etc.

16
Chapter 5, continued: Linear, power, and exponential functions Polynomial fitting polyfit(), polyval() Linear regression y/x, etc. Plotting multiple plots in a single figure subplot, hold

17
Any questions?

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google