Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Numerical Integration.

Slides:



Advertisements
Similar presentations
MATLAB: toolboxes, technical calculations. Numeric integration (1) Evaluating integral: computing a surface below a curve.
Advertisements

Matlab Graphics S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: 2D Graphics.
Differential Equations Math Review with Matlab: Finding Solutions to Differential Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department.
Functions in MatLab Create a new folder on your Z:drive called MatLab_Class24 Start MatLab and change your current directory to MatLab_Class24 Topics:
Programming Environment S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Cells and Structures.
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Numerical Interpolation.
Introduction to Matlab:
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 19P. 1Winter Quarter MATLAB: Script and.
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Optimization Toolbox.
Programming Environment S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Control Flow.
Math Review with Matlab: Application: Solving Differential Equations
A Brief Introduction to MATLAB Shibaji Shome and Rob MacLeod CVRTI University of Utah.
Matlab Matlab is a powerful mathematical tool and this tutorial is intended to be an introduction to some of the functions that you might find useful.
Solving Algebraic Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department University of Michigan-Dearborn Math Review with Matlab:
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Matlab Basics Introduction to Matlab: Matrix Operations.
8/8/ Gauss Quadrature Rule of Integration Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan Math Review with Matlab: Fundamentals Symbolic Math Toolbox.
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Laplace Transform Math Review with Matlab: Calculating the Laplace.
Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Polynomial Manipulations.
Introduction to programming in MATLAB MATLAB can be thought of as an super-powerful graphing calculator Remember the TI-83 from calculus? With many more.
Digital Image Processing Lecture3: Introduction to MATLAB.
M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in text files called M- files. M-files are.
INTRO TO PROGRAMMING Chapter 2. M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in text files.
Area of a single trapezoid = h
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Matlab Programming for Engineers Dr. Nidal Farhat Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
Matlab Basics Tutorial. Vectors Let's start off by creating something simple, like a vector. Enter each element of the vector (separated by a space) between.
MATLAB Basics. The following screen will appear when you start up Matlab. All of the commands that will be discussed should be typed at the >> prompt.
Function M-File Numerical Computing with. MATLAB for Scientists and Engineers.
S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: User Input / Output Programming Environment.
Topic 1Topic 2Topic 3Topic 4Topic
Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB.
MATLAB Harri Saarnisaari, Part of Simulations and Tools for Telecommunication Course.
Advanced Topics- Functions Introduction to MATLAB 7 Engineering 161.
Synthesis ENGR 1181 MATLAB 11. Topics  No new material  Covers topics that will be on the Midterm 2 Exam MATLAB 01 – Program Design MATLAB 02 – Introduction.
Scientific Computing Introduction to Matlab Programming.
User-defined Matlab functions. Creating function m-files with a plain text editor MATLAB m-files must be plain text files. Most word-processors provide.
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
Recap Saving Plots Summary of Chapter 5 Introduction of Chapter 6.
Analyzing Functions (4.16) y=f(x) MATLAB. Functional Analysis includes: Plotting and evaluating a function Finding extreme points Finding the roots (zeros.
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
More Functions in MATLAB. Functions that operate on other functions A function F() can take another function G() as an argument by using a notation:
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Program design and algorithm development We will consider the design of your own toolbox to be included among the toolboxes already available with your.
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
Matlab Tutorial 1 David Goldstein University of Colorado Dept of Aerospace Engineering Sciences.
ME 123 Computer Applications I Lecture 16: More Matlab Programming: Secant Method, Review 4/4/03.
ENG College of Engineering Engineering Education Innovation Center 1 Functions 1 in MATLAB Topics Covered: 1.Uses of Functions Organizational Tool.
1 CHEM-E7130 Process Modeling Exercise Numerical integration, distributions etc.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
User Defined Functions Spring EE 201. Class Learning Objectives  Achieve Comprehension LOL of User Defined Functions. Spring
L2. Basics Variables and Expressions Assignment Statements
Your graphing calculator can be used to evaluate definite integrals:
Introduction to Programming for Mechanical Engineers
Area of a single trapezoid = h
Finding the Area Between Curves
ME 123 Computer Applications I Lecture 24: Character Strings 4/18/03
Area of a single trapezoid = h
Numerical Computation and Optimization
Using Script Files and Managing Data
Area of a single trapezoid = h
Introduction to Matlab:
Introduction to Matlab: Element by Element Operations
ME 123 Computer Applications I Lecture 25: MATLAB Overview 4/28/03
ME 123 Computer Applications I Lecture 4: Vectors and Matrices 3/14/03
Introduction to Matlab
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Presentation transcript:

Numerical Operations S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Numerical Integration

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Integration 2 Integration Topics n Numerical Integration Numerical Integration n General M-Functions General M-Functions n Integral M-Function Integral M-Function n Integration M-Function Example Integration M-Function Example

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Integration 3 Numerical Integration n For an arbitrary 2-D curve, the area under the curve is defined as:

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Integration 4 Matlab M-Functions n Matlab allows users to create M-Functions which can be called by Matlab. n The commands and functions that comprise the new function must be put in a file whose name defines the name of the new function n Use filename extension of '.m' n At the top of the file must be a line that contains the syntax definition for the new function

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Integration 5 n The file will contain only the following lines: function y=fint(x) y = exp(x) + atan(x); Integral M-Function n Find the following integral numerically n In Matlab, create a new m-file named fint.m to define the function fint Output Vector Input Vector File Named fint.m

Numerical Operations: U of M-Dearborn ECE Department Introduction to MATLAB and its Toolboxes Integration 6 Calculating the Integral quad is used to calculate the area (integral) » area=quad('fint',0,1) Upper Limit area = Lower Limit Function Name (string) To get a more exact answer use quad8 In the function fint, we assume that x is a vector