ME 123 Computer Applications I

Slides:



Advertisements
Similar presentations
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
Advertisements

1 Combinational Logic Design&Analysis. 2 Introduction We have learned all the prerequisite material: – Truth tables and Boolean expressions describe functions.
CMPS 1371 Introduction to Computing for Engineers
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
Chapter 3 Planning Your Solution
Theorems on continuous functions. Weierstrass’ theorem Let f(x) be a continuous function over a closed bounded interval [a,b] Then f(x) has at least one.
Chapter 6 Finding the Roots of Equations
What does it take to make the most of Your Math Homework ?
L. Grewe.  An array ◦ stores several elements of the same type ◦ can be thought of as a list of elements: int a[8]
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
CS 111 – Nov. 22 Chapter 7 Software engineering Systems analysis Commitment –Please read Section 7.4 (only pp ), Sections –Homework #2.
 3(x – 2)  6(x – 4) Simplify:  2 + 3x + 7x -1  10x – 3x + 2x + 3x.
Numerical Methods Solution of Equation.
ITEC 109 Lecture 11 While loops. while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself?
Structured Programming II: If Statements By the end of this class you should be able to: implement branching in a program describe and use an “if” statement.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
ME 123 Computer Applications I Lecture 16: More Matlab Programming: Secant Method, Review 4/4/03.
Program Design & Development EE 201 C7-1 Spring
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Class 8_2 Today: Finish MatLab review Modeling work session Reminder: Computer model due as a HW assignment on March 6, next Thursday. (Be sure to keep.
All important information will be posted on Blackboard
Applied Discrete Mathematics Week 2: Functions and Sequences
Computer Application in Engineering Design
Solution of Nonlinear Equations (Root finding Problems
ME 123 Computer Applications I Lecture 32: More Simulations 5/9/03
7-3 Solving Subtraction and Addition Equations
MAT 2720 Discrete Mathematics
Problem-Solving and Control Structures By Faith Brenner
ME 123 Computer Applications I
ME 123 Computer Applications I Lecture 24: Character Strings 4/18/03
ME 123 Computer Applications I
CS 336/536: Computer Network Security Fall 2015 Nitesh Saxena
Opening Activity Mid Chapter Check
Intermediate Value Theorem
Compare and Order Whole Numbers and Decimals
Intermediate Value Theorem
Lecture 18 CSE 331 Oct 12, 2011.
Section 6.1: More About Areas
ME 123 Computer Applications I Lecture 29: Modeling 5/5/03
ME 123 Computer Applications I Lecture 23: Advanced Graphics 4/17/03
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Recapitulation of Lecture 8
Chengyu Sun California State University, Los Angeles
Loop Construct.
Basic Concepts of Algorithm
Week of March 17-21, 2014 Warm-ups.
Richard Anderson Lecture 25 NP Completeness
EECE.2160 ECE Application Programming
Week 7: Computer Tools for Problem Solving and Critical Thinking
ME 123 Computer Applications I Lecture 25: MATLAB Overview 4/28/03
EECE.2160 ECE Application Programming
Michael Ernst UW CSE 190p Summer 2012
Electrical and Computer Engineering Department SUNY – New Paltz
Recapitulation of Lecture 11
Recapitulation of Lecture 5
Week of March
Constraint Graph Binary CSPs
ME 123 Computer Applications I Lecture 11: More on For loop 3/27/03
Recapitulation of Lecture 13
ME 123 Computer Applications I Lecture 4: Vectors and Matrices 3/14/03
ME 123 Computer Applications I Lecture 8: System of Equations 3/21/03
Recapitulation of Lecture 12
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
ME 123 Computer Applications I Lecture 7: Basic Functions 3/20/03
Creating behaviours: MOVEMENT
Presentation transcript:

ME 123 Computer Applications I Lecture 15: More Matlab Programming: Root Finding 4/3/03

ME 123 Computer Applications I Reminder Program 2 is due on Friday before class Exam 1 will be on next Monday. Lecture 15 ME 123 Computer Applications I

Recapitulation of Lecture 14 In the last lecture, we learned the while loop and switch statement Homework feedback: Pay attention to the ending value of your time marching variable. If the upper limit of your for loop is x_end, the Explicit Euler will give you a value at x = x_end + step_size upon completion of the loop. When you define a variable, make sure it is consistently a scalar or a vector throughout the program. Some of your programs switch between the two! Advice to your programming: Work out the problem by hand first. If you don’t know the procedure, you cannot give correct instructions to the computer! I guarantee it. You immediate task would be to understand the problem first, not the programming!! Lecture 15 ME 123 Computer Applications I

ME 123 Computer Applications I Road Map of Lecture 15 Solutions to HW 4-2 More Matlab programming exercise: root finding the bisection method: cut the bounding interval in half each time until the required accuracy is achieved work out flow chart with students and emphasize its importance emphasize sequential thinking in programming Lecture 15 ME 123 Computer Applications I

“Crude” Flow Chart for Bisection Input left and right bounds no Check to make sure they bound the root (How?) yes Compute the mid-point Check if the mid-point and the lower bound sandwich the root (How?) yes no upper bound = mid-point lower bound = mid-point Lecture 15 ME 123 Computer Applications I