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

Presentation on theme: "Exam #3 Review: Comprehensive Exam Class 14.2 Palm Matlab Book Ch. 1-5."— Presentation transcript:

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

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).

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

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()

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

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

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

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

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

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

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

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

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

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.

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

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

Any questions?

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

Similar presentations
{"ft_lang_label":"__label__en","ft_lang_prob":0.70439243,"math_prob":0.8799169,"size":2707,"snap":"2019-43-2019-47","text_gpt3_token_len":685,"char_repetition_ratio":0.13207547,"word_repetition_ratio":0.0,"special_character_ratio":0.29737717,"punctuation_ratio":0.2417154,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9682602,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-22T17:34:05Z\",\"WARC-Record-ID\":\"<urn:uuid:c9b7027d-6234-4a19-906b-406f65f32212>\",\"Content-Length\":\"166348\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:dc860d63-09c1-4191-bcb7-81eb766efdf9>\",\"WARC-Concurrent-To\":\"<urn:uuid:43a6347d-2b5a-478d-a4dd-a775c05adfdc>\",\"WARC-IP-Address\":\"144.76.153.40\",\"WARC-Target-URI\":\"http://slideplayer.com/slide/5083952/\",\"WARC-Payload-Digest\":\"sha1:5XWINAVST5CHADPIWHNKV3NA5KURK54G\",\"WARC-Block-Digest\":\"sha1:YPZJFP5RVU66LUPDJWGP7DYL4TU3NTTQ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570987822458.91_warc_CC-MAIN-20191022155241-20191022182741-00360.warc.gz\"}"}