Download presentation
Presentation is loading. Please wait.
Published byMorgan Skinner Modified over 9 years ago
1
ME 123 Computer Applications I Lecture 16: More Matlab Programming: Secant Method, Review 4/4/03
2
Lecture 16ME 123 Computer Applications I2 Reminder Exam 1 will be on next Monday (closed book, closed notes, closed computer)
3
Lecture 16ME 123 Computer Applications I3 Recapitulation of Lecture 15 In the last lecture, we did not learn new Matlab command. Instead we apply what we have learned so far to program a root finder using the bisection method. Homework feedback: –Comparison between Problem 2 and Problem 3 indicates that some of you have difficulty with understanding the problem statement, NOT the programming part. –Apply the flow chart methodology every time before you start any programming. –Sequential thinking: the order of your procedure matters a lot!
4
Lecture 16ME 123 Computer Applications I4 Road Map of Lecture 16 Solutions to HW 4-3 More Matlab programming exercise: root finding –the secant method: variant of the bisection method, make use of the information on functional value –work out flow chart with students Review for Exam 1
5
Lecture 16ME 123 Computer Applications I5 “Crude” Flow Chart for Secant Method Input left and right bounds Check to make sure they bound the root (How?) Compute the approximate root (How?) Check if the app. root and the lower bound sandwich the root (How?) upper bound = app. rootlower bound = app. root yesno yes no
6
Lecture 16ME 123 Computer Applications I6 Review for Exam 1 Definition of scalar, vector, matrix; naming convention 2-D plotting (line, marker, labeling, legend, etc.) Input/Output (command line, data file, etc.) User defined function (input/output list), m-file Solution to system of equations if statement, relational operators for loop switch statement while loop
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.