Complex Dynamic Systems

Size: px
Start display at page:

Download "Complex Dynamic Systems"

Transcription

1 Complex Dynamic Systems Department of Information Engineering and Mathematics University of Siena (Italy) (mocenni at dii.unisi.it) (madeo at dii.unisi.it) (roberto.zingone at unisi.it) Lab Session #5 Dec 4, 2017

2 A discrete time system A generic discrete time system (first order) is described by an equation in the form: Consider the Logistic equation: x n+1 = f (x n, r). x n+1 = rx n (1 x n ), where r is a positive real parameter. Steady states - Find x such that x n+1 = x n = x. For the logistic equation, we have two steady states: x1 = 0 x2 = r 1 r

3 Stability analysis (1/12) To study the stability of the steady states, we need the derivative of f wrt to x: f = r 2rx. if f (x ) < 1, then the steady state x is asymptotically stable. if f (x ) > 1, then the steady state x is unstable. if f (x ) = 1, we can t say nothing about the stability of x.

4 Stability analysis (2/12) Stability of x 1 : Then f (x 1 ) = r. if 0 < r < 1, x1 is asymptotically stable. if 1 < r 4, x1 is unstable. r = 1 could be a bifurcation point. Notice that: f (x 1 ) r=1 = 1. Then here we can have a saddle-node bifurcation, or a transcritical bifurcation, or a pitchfork bifurcation.

5 Stability analysis (3/12) Stability of x2 : f (x2 ) = 2 r. Then if 1 < r < 3, x2 is asymptotically stable. if 0 r < 1, x1 is unstable. if 3 < r 4, x1 is unstable. r = 1 could be a bifurcation point. Notice that: f (x 2 ) r=1 = 1. Then for r = 1 we can have a saddle-node bifurcation, or a transcritical bifurcation, or a pitchfork bifurcation. Moreover, notice that: f (x 2 ) r=3 = 1. Then for r = 3 we can have a flip bifurcation.

6 Stability analysis (4/12) Summarizing: For r = 1, we have a transcritical bifurcation (exchange of stability between two points) For r = 3, we may have a flip bifurcation (this must verified via simulations)

7 Stability analysis (5/12) Download DTanalysis.m from the course web site: mocenni/compdynsys-teach html function DTanalysis () %% System parameter ( varying ) rrange = 0:0.05:4; %% Time steps NT = 100; %% Initial condition x0 = 0.3; %% Set up the dimension of the images xmin = 0; xmax = 1;

8 Stability analysis (6/12) %% If tpause = 0, then the program waits for a key stroke in the %% Command windows before going on. %% If tpause > 0, then you will obtain a movie. The delay between %% each frame is equal to tpause ( in seconds ). tpause = 0.; %% Technical objects laststeps = 10; npoints = 100; xplotrange = linspace ( xmin, xmax, npoints );

9 Stability analysis (7/12) %% Run the simulations for each value of r and plot figure % Normal ( from smallest to biggest r) for i =1: numel ( rrange ) % % Reverse ( from biggest to smallest r) % for i= numel ( rrange ) : -1:1 %% Fix parameter r r = rrange (i); %% Steady states xss (1) = 0; xss (2) = (r -1) /r; %% Simulate x = zeros (NT +1, 1); x (1) = x0; for n =1: NT x(n +1) = f(x(n), r);

10 Stability analysis (8/12) %% Plot in the x_{n}/ x_{n +1} plane subplot (1,2,1) %% Plot the bisectrix plot ( xplotrange, xplotrange, 'k '); hold on %% Plot the right - hand function f ( x_{ n +1} = f( x_{n}) fplot = zeros ( npoints, 1); for j =1: npoints fplot (j) = f( xplotrange (j), r); plot ( xplotrange, fplot, 'g ');

11 Stability analysis (9/12) %% Plot the steady states for j =1: numel ( xss ) if ( isreal ( xss (j))) scatter ( xss (j), f( xss (j), r), 120,, ' MarkerFaceColor ', 'c '); 'c ' %% Plot the trajectory on f ftraj = zeros (NT +1, 1); for j =1: NT +1 ftraj (j) = f(x(j), r); plot (x, ftraj, '.b ', ' MarkerSize ', 20) ; %% Plot the last laststeps points of the trajectory on f plot (x( - laststeps : ), ftraj ( - laststeps : ), '.r ', ' MarkerSize ', 20) ;

12 Stability analysis (10/12) %% Plot the initial condition of the trajectory on f plot (x (1), ftraj (1), '.m ', ' MarkerSize ', 20) ; %% Plot the tangents... for j =1: numel ( xss ) if ( isreal ( xss (j))) plot ( xplotrange, f( xss (j), r) + fprime ( xss (j),r)*( xplotrange - xss (j)), 'c-- ', ' LineWidth ', 2); title ( sprintf ( 'r = xlabel ( 'x_n ') ylabel ( 'x_{n +1} ') xlim ([ xmin xmax ]) ylim ([ xmin xmax ]) hold off %.2 f ', r));

13 Stability analysis (11/12) %% Plot over time subplot (1,2,2) %% Plot the trajectory over time plot (0: NT, x, 'b.- ', ' MarkerSize ', 20, 'Color ', 'k ', ' MarkerEdgeColor ', 'b ') hold on %% Plot the last laststeps points of the trajectory over time in red plot (NT - laststeps :NT, x(nt - laststeps +1: NT +1), r. ', ' MarkerSize ', 20) ' %% Plot the initial condition in magenta plot (0, x (1), 'm. ', ' MarkerSize ', 20) plot (0, x (2), 'm. ', ' MarkerSize ', 20) xlabel ( 'time (n) ') ylabel ( 'f( x_n ) ') xlim ([0 NT ]) ylim ([ xmin xmax ]) hold off

14 Stability analysis (12/12) %% Pause if ( tpause == 0) pause else pause ( tpause ) %% Customizable function ( right hand part of the DT system, x_{n +1} = f(x_{n})) function xnext = f(x, r) xnext = r*x*(1 -x); %% Derivative of the customizable function (f '( x)) function fp = fprime (x, r) fp = r - 2* r* x;

15 Now, run the script! Running the script, you get the following images: For r = 0.5, x1 is stable, x 2 is unstable.

16 Now, run the script! Running the script, you get the following images: For r = 1.5, x1 is unstable, x 2 is stable.

17 Now, run the script! Running the script, you get the following images: For r = 3, we observe a flip bifurcation for x 2.

18 Now, run the script! Running the script, you get the following images: Here, we observe another flip bifurcation for x 2.

19 Now, run the script! Running the script, you get the following images: For bigger value of r, we observe chaotic behavior!

20 Quadratic map (1/2) Let s study another discrete time system: x n+1 = x 2 n + r, for r [ 2, 1] The steady states are: x1 = r 2 x2 = 1 1 4r 2 NOTE: these steady states exist for r 1 4. Matlab code: %% Steady states xss (1) = (1 + sqrt (1-4*r)) /2; xss (2) = (1 - sqrt (1-4*r)) /2;

21 Quadratic map (2/2) Stability analysis: For r = 1 4, we have a saddle-node bifurcation For r = 3 4, we may have a flip bifurcation (this must verified via simulations) Do you observe chaos? For which values of r? Tips Try to run DTanalysis.m in reverse mode (from the biggest to the smallest r value) Adjust xmin and xmax

22 Two-steps dynamics of the logistic equation (1/3) Download DTanalysis f2.m from the course web site: mocenni/compdynsys-teach html. The file DTanalysis f2.m has the same structure of DTanalysis.m, but it is divided into two parts: 1 Analysis of x n+1 = f (x n ) 2 Analysis of x n+2 = f (f (x n )) (two-steps dynamics) Hereafter, we explain some important parts.

23 Two-steps dynamics of the logistic equation (2/3) %% SECOND PART : two steps dynamics (x_{n +2} = f(f( x_n ))) %% Steady states xss_f2 (1) = 0; xss_f2 (2) = (r -1) /r; xss_f2 (3) = (r + sqrt ((r + 1) *(r - 3)) + 1) /(2* r); xss_f2 (4) = (r - sqrt ((r + 1) *(r - 3)) + 1) /(2* r); Here you must specify the steady states of f (f (x)).

24 Two-steps dynamics of the logistic equation (3/3) %% f(f(x)) function xnext = f2(x, r) xnext = f(f(x,r), r); %% Derivative of f( f( x)) %% Evaluated using the chain rule %% d(f(f(x)))/dx = f '(x) f '(f(x)) function fp = f2prime (x, r) fp = fprime (x,r)* fprime (f(x,r), r); These two functions evaluates f (f (x)) and f (f (x)) dx is evaluated using the chain rule: f (f (x)) dx = f (x)f (f (x)) f (f (x)). Notice that dx

25 Now, run the script! Running the script, you get the following images: Here we are just before the flip bifurcation for the original system.

26 Now, run the script! Running the script, you get the following images: For r = 3, we observe a pitchfork bifurcation for the two-steps dynamical system.

27 Now, run the script! Running the script, you get the following images: The second flip for the original system corresponds to a flip for the two-steps dynamical system.

28 Sensitivity to initial conditions (1/7) Download DTsensitivity.m from the course web site: mocenni/compdynsys-teach html function DTsensitivity () %% Fix the parameter r = 0.5; %% Time steps NT = 30; %% Initial conditions x0_1 = 0.5; x0_2 = 0.501; %% Set up the dimension of the images xmin = 0; xmax = 1;

29 Sensitivity to initial conditions (2/7) %% If tpause = 0, then the program waits %% for a key stroke in the %% Command windows before going on. %% If tpause > 0, then you will obtain a movie. %% The delay between each frame is %% equal to tpause ( in seconds ). tpause = 0.1; %% Technical objects npoints = 100; xplotrange = linspace ( xmin, xmax, npoints );

30 Sensitivity to initial conditions (3/7) %% Set up the x_{n}/ x_{n +1} plane figure subplot (1,2,1) %% Plot the bisectrix plot ( xplotrange, xplotrange, 'k '); hold on %% Plot the right - hand function f (x_{n +1} = f(x_{n}) fplot = zeros ( npoints, 1); for j =1: npoints fplot (j) = f( xplotrange (j), r); plot ( xplotrange, fplot, 'g '); title ( sprintf ( 'r = xlabel ( 'x_n ') ylabel ( 'x_{n +1} ') %.2 f ', r));

31 Sensitivity to initial conditions (4/7) %% Setup the plot over time subplot (1,2,2) %% Draw the initial conditions scatter (0, x0_1, 120, 'b ', ' MarkerFaceColor ', 'b '); hold on scatter (0, x0_2, 120, 'r ', ' MarkerFaceColor ', 'r '); title ( sprintf ( ' Trajectories over time - r = %.2 f ', r)); xlabel ( 'time (n) ') ylabel ( 'f( x_n ) ')

32 Sensitivity to initial conditions (5/7) %% Run the simulations x1 = x0_1 ; x2 = x0_2 ; for n =0: NT -1 x1next x2next = f(x1, r); = f(x2, r); %% Plot the cobwebs subplot (1,2,1) plot ([ x1 x1], [x1 x1next ], 'b '); plot ([ x1 x1next ], [ x1next, x1next ], 'b ') plot ([ x2 x2], [x2 x2next ], 'r '); plot ([ x2 x2next ], [ x2next, x2next ], 'r ') xlim ([ xmin xmax ]) ylim ([ xmin xmax ])

33 Sensitivity to initial conditions (6/7) %% Plot the trajectories over time subplot (1,2,2) plot (n:n+1, [x1 x1next ], 'b.-- ',... ' MarkerSize ', 20, 'Color ', 'b ', ' MarkerEdgeColor ', 'b ') plot (n:n+1, [x2 x2next ], 'r.-- ',... ' MarkerSize ', 20, 'Color ', 'r ', ' MarkerEdgeColor ', 'r ') xlim ([0 NT ]) ylim ([ xmin xmax ])

34 Sensitivity to initial conditions (7/7) %% Pause if ( tpause == 0) pause else pause ( tpause ) %% Copy x1 and x2 to x1next and x2next x1 = x1next ; x2 = x2next ; %% Customizable function ( right hand part %% of the DT system, x_{n +1} = f(x_{n})) function xnext = f(x, r) xnext = r*x*(1 -x);

35 Now, run the script! Running the script, you get the following images: For r = 0.5, the trajectories are (almost) indistinguishable.

36 Now, run the script! Set r = 1.5, x 1 (0) = 0.8 and x 2 (0) = Running the script, you get the following images: Again, the trajectories are (almost) indistinguishable.

37 Now, run the script! Set r = 3.9 (chaotic regime). Running the script, you get the following images: Chaotic behavior is characterized by a strong sensitivity to initial conditions. Indeed, after same time, the trajectories are very different, although bounded.

Complex Dynamic Systems

Complex Dynamic Systems Complex Dynamic Systems Department of Information Engineering and Mathematics University of Siena (Italy) (mocenni at dii.unisi.it) (madeo at dii.unisi.it) (roberto.zingone at unisi.it) Lab Session #1

More information

MATLAB Laboratory 09/23/10 Lecture. Chapters 5 and 9: Plotting

MATLAB Laboratory 09/23/10 Lecture. Chapters 5 and 9: Plotting MATLAB Laboratory 09/23/10 Lecture Chapters 5 and 9: Plotting Lisa A. Oberbroeckling Loyola University Maryland loberbroeckling@loyola.edu L. Oberbroeckling (Loyola University) MATLAB 09/23/10 Lecture

More information

fplot Syntax Description Examples Plot Symbolic Expression Plot symbolic expression or function fplot(f) fplot(f,[xmin xmax])

fplot Syntax Description Examples Plot Symbolic Expression Plot symbolic expression or function fplot(f) fplot(f,[xmin xmax]) fplot Plot symbolic expression or function Syntax fplot(f) fplot(f,[xmin xmax]) fplot(xt,yt) fplot(xt,yt,[tmin tmax]) fplot(,linespec) fplot(,name,value) fplot(ax, ) fp = fplot( ) Description fplot(f)

More information

Name: Math Analytic Geometry and Calculus III - Spring Matlab Project - due on Wednesday, March 30

Name: Math Analytic Geometry and Calculus III - Spring Matlab Project - due on Wednesday, March 30 Name: Math 275 - Analytic Geometry and Calculus III - Spring 2011 Solve the following problems: Matlab Project - due on Wednesday, March 30 (Section 14.1 # 30) Use Matlab to graph the curve given by the

More information

Introductory Scientific Computing with Python

Introductory Scientific Computing with Python Introductory Scientific Computing with Python Introduction, IPython and Plotting FOSSEE Department of Aerospace Engineering IIT Bombay SciPy India, 2015 December, 2015 FOSSEE group (IIT Bombay) Interactive

More information

GUI Alternatives. Syntax. Description. MATLAB Function Reference plot. 2-D line plot

GUI Alternatives. Syntax. Description. MATLAB Function Reference plot. 2-D line plot MATLAB Function Reference plot 2-D line plot GUI Alternatives Use the Plot Selector to graph selected variables in the Workspace Browser and the Plot Catalog, accessed from the Figure Palette. Directly

More information

A function f(α) is quasiconvex[2, p. 108] if f(λα 1 +(1 λ)α 2 ) max [f(α 1 ),f(α 2 )] for all 0 λ 1

A function f(α) is quasiconvex[2, p. 108] if f(λα 1 +(1 λ)α 2 ) max [f(α 1 ),f(α 2 )] for all 0 λ 1 Problem definition Line search algorithms Uniform search Dichotomous search Golden section search Quadratic fit search Overview of Line Search Topics Problem Definition f() The line search problem: find

More information

AMS 27L LAB #2 Winter 2009

AMS 27L LAB #2 Winter 2009 AMS 27L LAB #2 Winter 2009 Plots and Matrix Algebra in MATLAB Objectives: 1. To practice basic display methods 2. To learn how to program loops 3. To learn how to write m-files 1 Vectors Matlab handles

More information

SGN Introduction to Matlab

SGN Introduction to Matlab SGN-84007 Introduction to Matlab Lecture 4: Data Visualization Heikki Huttunen Alessandro Foi October 10, 2016 Outline Basics: figure, axes, handles, properties; Plotting univariate and multivariate data;

More information

Basic plotting commands Types of plots Customizing plots graphically Specifying color Customizing plots programmatically Exporting figures

Basic plotting commands Types of plots Customizing plots graphically Specifying color Customizing plots programmatically Exporting figures Basic plotting commands Types of plots Customizing plots graphically Specifying color Customizing plots programmatically Exporting figures Matlab is flexible enough to let you quickly visualize data, and

More information

Introduction to MATLAB LAB 1

Introduction to MATLAB LAB 1 Introduction to MATLAB LAB 1 1 Basics of MATLAB MATrix LABoratory A super-powerful graphing calculator Matrix based numeric computation Embedded Functions Also a programming language User defined functions

More information

LOWELL WEEKLY JOURNAL.

LOWELL WEEKLY JOURNAL. N $ N N N 5 * N F N F *» ) N F N * )» N F 5 N F ** *» FXN* X N F N N * N q» N q $ $ $ q* 5 5 * q 5 * 5 q N * * F N / N N» N N X )» * * F F N * * * N * / * N F F F N F X F * N F N ** N N F * NF N N F X

More information

User-Defined Function

User-Defined Function ENGR 102-213 (Socolofsky) Week 11 Python scripts In the lecture this week, we are continuing to learn powerful things that can be done with userdefined functions. In several of the examples, we consider

More information

Introduction to XPPAUT Lab

Introduction to XPPAUT Lab Introduction to XPPAUT Lab Anna M. Barry March 10, 2011 Abstract In this lab, we will explore the Lorenz model from the xppall/ode file that was downloaded with XPPAUT. We will make a bifurcation diagram

More information

Introduction to Matlab. WIAA Technical Workshop #2 10/20/2015

Introduction to Matlab. WIAA Technical Workshop #2 10/20/2015 Introduction to Matlab WIAA Technical Workshop #2 10/20/2015 * This presentation is merely an introduction to some of the functions of MATLAB and is not a comprehensive review of their capabilities. **

More information

What you will learn today

What you will learn today What you will learn today Tangent Planes and Linear Approximation and the Gradient Vector Vector Functions 1/21 Recall in one-variable calculus, as we zoom in toward a point on a curve, the graph becomes

More information

Getting Started with MATLAB

Getting Started with MATLAB Getting Started with MATLAB Math 315, Fall 2003 Matlab is an interactive system for numerical computations. It is widely used in universities and industry, and has many advantages over languages such as

More information

f xx (x, y) = 6 + 6x f xy (x, y) = 0 f yy (x, y) = y In general, the quantity that we re interested in is

f xx (x, y) = 6 + 6x f xy (x, y) = 0 f yy (x, y) = y In general, the quantity that we re interested in is 1. Let f(x, y) = 5 + 3x 2 + 3y 2 + 2y 3 + x 3. (a) Final all critical points of f. (b) Use the second derivatives test to classify the critical points you found in (a) as a local maximum, local minimum,

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Violeta Ivanova, Ph.D. Office for Educational Innovation & Technology violeta@mit.edu http://web.mit.edu/violeta/www Topics MATLAB Interface and Basics Calculus, Linear Algebra,

More information

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial Vb Making Plots with Matlab (last updated 5/29/05 by GGB) Objectives: These tutorials are

More information

Graphics and plotting techniques

Graphics and plotting techniques Davies: Computer Vision, 5 th edition, online materials Matlab Tutorial 5 1 Graphics and plotting techniques 1. Introduction The purpose of this tutorial is to outline the basics of graphics and plotting

More information

Classes 7-8 (4 hours). Graphics in Matlab.

Classes 7-8 (4 hours). Graphics in Matlab. Classes 7-8 (4 hours). Graphics in Matlab. Graphics objects are displayed in a special window that opens with the command figure. At the same time, multiple windows can be opened, each one assigned a number.

More information

Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression.

Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression. What is the answer? >> Logical Subscripting: This kind of subscripting can be done in one step by specifying the logical operation as the subscripting expression. The finite(x)is true for all finite numerical

More information

EOSC 473/573 Matlab Tutorial R. Pawlowicz with changes by M. Halverson

EOSC 473/573 Matlab Tutorial R. Pawlowicz with changes by M. Halverson EOSC 473/573 Matlab Tutorial R. Pawlowicz with changes by M. Halverson February 12, 2008 Getting help 1. Local On-line help (a) text-based help: >> help (b) GUI-help >> helpwin (c) Browser-based

More information

MATLAB Tutorial. Mohammad Motamed 1. August 28, generates a 3 3 matrix.

MATLAB Tutorial. Mohammad Motamed 1. August 28, generates a 3 3 matrix. MATLAB Tutorial 1 1 Department of Mathematics and Statistics, The University of New Mexico, Albuquerque, NM 87131 August 28, 2016 Contents: 1. Scalars, Vectors, Matrices... 1 2. Built-in variables, functions,

More information

EGR 102 Introduction to Engineering Modeling. Lab 05B Plotting

EGR 102 Introduction to Engineering Modeling. Lab 05B Plotting EGR 102 Introduction to Engineering Modeling Lab 05B Plotting 1 Overview Plotting in MATLAB 2D plotting ( ezplot(), fplot(), plot()) Formatting of 2D plots 3D plotting (surf(), mesh(), plot3()) Formatting

More information

BASIC CONCEPTS IN 1D

BASIC CONCEPTS IN 1D CHAPTER BASIC CONCEPTS IN D In the preceding chapter we introduced a brief list of basic concepts of discrete dynamics. Here, we expand on these concepts in the one-dimensional context, in which, uniquely,

More information

k-nn classification & Statistical Pattern Recognition

k-nn classification & Statistical Pattern Recognition k-nn classification & Statistical Pattern Recognition Andreas C. Kapourani (Credit: Hiroshi Shimodaira) February 27 k-nn classification In classification, the data consist of a training set and a test

More information

ME422 Mechanical Control Systems Matlab/Simulink Hints and Tips

ME422 Mechanical Control Systems Matlab/Simulink Hints and Tips Cal Poly San Luis Obispo Mechanical Engineering ME Mechanical Control Systems Matlab/Simulink Hints and Tips Ridgely/Owen, last update Jan Building A Model The way in which we construct models for analyzing

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Violeta Ivanova, Ph.D. MIT Academic Computing violeta@mit.edu http://web.mit.edu/violeta/www/iap2006 Topics MATLAB Interface and Basics Linear Algebra and Calculus Graphics Programming

More information

MAT 275 Laboratory 1 Introduction to MATLAB

MAT 275 Laboratory 1 Introduction to MATLAB MATLAB sessions: Laboratory 1 1 MAT 275 Laboratory 1 Introduction to MATLAB MATLAB is a computer software commonly used in both education and industry to solve a wide range of problems. This Laboratory

More information

MATH 2221A Mathematics Laboratory II

MATH 2221A Mathematics Laboratory II MATH A Mathematics Laboratory II Lab Assignment 4 Name: Student ID.: In this assignment, you are asked to run MATLAB demos to see MATLAB at work. The color version of this assignment can be found in your

More information

Computational Foundations of Cognitive Science. Inverse. Inverse. Inverse Determinant

Computational Foundations of Cognitive Science. Inverse. Inverse. Inverse Determinant Computational Foundations of Cognitive Science Lecture 14: s and in Matlab; Plotting and Graphics Frank Keller School of Informatics University of Edinburgh keller@inf.ed.ac.uk February 23, 21 1 2 3 Reading:

More information

Introduction to GNU-Octave

Introduction to GNU-Octave Introduction to GNU-Octave Dr. K.R. Chowdhary, Professor & Campus Director, JIETCOE JIET College of Engineering Email: kr.chowdhary@jietjodhpur.ac.in Web-Page: http://www.krchowdhary.com July 11, 2016

More information

Introduction to Matlab

Introduction to Matlab What is Matlab? Introduction to Matlab Matlab is software written by a company called The Mathworks (mathworks.com), and was first created in 1984 to be a nice front end to the numerical routines created

More information

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, March 8

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, March 8 CS/NEUR125 Brains, Minds, and Machines Lab 6: Inferring Location from Hippocampal Place Cells Due: Wednesday, March 8 This lab explores how place cells in the hippocampus encode the location of an animal

More information

Lecture 5 of AMS 200 LaTeX Typesetting, Writing and

Lecture 5 of AMS 200 LaTeX Typesetting, Writing and Lecture 5 of AMS 200 LaTeX Typesetting, Writing and Hongyun Wang hongwang@soe.ucsc.edu November 3, 2014 1 LaTeX Typesetting LaTeX is a computer program for typesetting journals, manuscripts, reports It

More information

Numerical Methods in Engineering Sciences

Numerical Methods in Engineering Sciences Numerical Methods in Engineering Sciences Lecture 1: Brief introduction to MATLAB Pablo Antolin pablo.antolinsanchez@unipv.it October 29th 2013 How many of you have used MATLAB before? How many of you

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 4 Visualising Data Dr Richard Greenaway 4 Visualising Data 4.1 Simple Data Plotting You should now be familiar with the plot function which is

More information

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BENC 2113 DENC ECADD 2532 ECADD LAB SESSION 6/7 LAB

More information

Direction Fields; Euler s Method

Direction Fields; Euler s Method Direction Fields; Euler s Method It frequently happens that we cannot solve first order systems dy (, ) dx = f xy or corresponding initial value problems in terms of formulas. Remarkably, however, this

More information

Time series plots and phase plane plots Graphics

Time series plots and phase plane plots Graphics Time series plots and phase plane plots Graphics Feb. 4, 2009 Graphics for Scientific/Technical Computation Line Plots Contour Plots Surface Plots What type of plots do we want?... - Time series plots

More information

ME 121 MATLAB Lesson 01 Introduction to MATLAB

ME 121 MATLAB Lesson 01 Introduction to MATLAB 1 ME 121 MATLAB Lesson 01 Introduction to MATLAB Learning Objectives Be able run MATLAB in the MCECS computer labs Be able to perform simple interactive calculations Be able to open and view an m-file

More information

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Matlab Tutorial

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Matlab Tutorial STAT/MATH 395 A - PROBABILITY II UW Winter Quarter 2016 Néhémy Lim Matlab Tutorial 1 Introduction Matlab (standing for matrix laboratory) is a high-level programming language and interactive environment

More information

ENGG1811 Computing for Engineers Week 11 Part C Matlab: 2D and 3D plots

ENGG1811 Computing for Engineers Week 11 Part C Matlab: 2D and 3D plots ENGG1811 Computing for Engineers Week 11 Part C Matlab: 2D and 3D plots ENGG1811 UNSW, CRICOS Provider No: 00098G1 W11 slide 1 More on plotting Matlab has a lot of plotting features Won t go through them

More information

PART 1 PROGRAMMING WITH MATHLAB

PART 1 PROGRAMMING WITH MATHLAB PART 1 PROGRAMMING WITH MATHLAB Presenter: Dr. Zalilah Sharer 2018 School of Chemical and Energy Engineering Universiti Teknologi Malaysia 23 September 2018 Programming with MATHLAB MATLAB Environment

More information

A Brief Introduction to MATLAB

A Brief Introduction to MATLAB A Brief Introduction to MATLAB MATLAB (Matrix Laboratory) is an interactive software system for numerical computations and graphics. As the name suggests, MATLAB was first designed for matrix computations:

More information

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE COMPUTER VISION 2017-2018 > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE OUTLINE Optical flow Lucas-Kanade Horn-Schunck Applications of optical flow Optical flow tracking Histograms of oriented flow Assignment

More information

A gentle introduction to Matlab

A gentle introduction to Matlab A gentle introduction to Matlab The Mat in Matlab does not stand for mathematics, but for matrix.. all objects in matlab are matrices of some sort! Keep this in mind when using it. Matlab is a high level

More information

Applied Calculus. Lab 1: An Introduction to R

Applied Calculus. Lab 1: An Introduction to R 1 Math 131/135/194, Fall 2004 Applied Calculus Profs. Kaplan & Flath Macalester College Lab 1: An Introduction to R Goal of this lab To begin to see how to use R. What is R? R is a computer package for

More information

Matlab Tutorial 1: Working with variables, arrays, and plotting

Matlab Tutorial 1: Working with variables, arrays, and plotting Matlab Tutorial 1: Working with variables, arrays, and plotting Setting up Matlab First of all, let's make sure we all have the same layout of the different windows in Matlab. Go to Home Layout Default.

More information

LAB 1: Introduction to MATLAB Summer 2011

LAB 1: Introduction to MATLAB Summer 2011 University of Illinois at Urbana-Champaign Department of Electrical and Computer Engineering ECE 311: Digital Signal Processing Lab Chandra Radhakrishnan Peter Kairouz LAB 1: Introduction to MATLAB Summer

More information

MATLAB Tutorial CSHA Suzhou Course 2011

MATLAB Tutorial CSHA Suzhou Course 2011 MATLAB Tutorial CSHA Suzhou Course 2011 Basics Malte J. Rasch National Key Laboratory of Cognitive Neuroscience and Learning Beijing Normal University China July 15, 2011 Overview Simply introduction to

More information

Getting Started. Chapter 1. How to Get Matlab. 1.1 Before We Begin Matlab to Accompany Lay s Linear Algebra Text

Getting Started. Chapter 1. How to Get Matlab. 1.1 Before We Begin Matlab to Accompany Lay s Linear Algebra Text Chapter 1 Getting Started How to Get Matlab Matlab physically resides on each of the computers in the Olin Hall labs. See your instructor if you need an account on these machines. If you are going to go

More information

Parallel stochastic simulation using graphics processing units for the Systems Biology Toolbox for MATLAB

Parallel stochastic simulation using graphics processing units for the Systems Biology Toolbox for MATLAB Parallel stochastic simulation using graphics processing units for the Systems Biology Toolbox for MATLAB Software usage guide Guido Klingbeil, Radek Erban, Mike Giles and Philip K. Maini This document

More information

This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in

This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in This module aims to introduce Precalculus high school students to the basic capabilities of Matlab by using functions. Matlab will be used in subsequent modules to help to teach research related concepts

More information

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX 1) Objective The objective of this lab is to review how to access Matlab, Simulink, and the Communications Toolbox, and to become familiar

More information

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation CDA6530: Performance Models of Computers and Networks Chapter 4: Using Matlab for Performance Analysis and Simulation Objective Learn a useful tool for mathematical analysis and simulation Interpreted

More information

PERI INSTITUTE OF TECHNOLOGY DEPARTMENT OF ECE TWO DAYS NATIONAL LEVEL WORKSHOP ON COMMUNICATIONS & IMAGE PROCESSING "CIPM 2017" Matlab Fun - 2

PERI INSTITUTE OF TECHNOLOGY DEPARTMENT OF ECE TWO DAYS NATIONAL LEVEL WORKSHOP ON COMMUNICATIONS & IMAGE PROCESSING CIPM 2017 Matlab Fun - 2 Table of Contents PERI INSTITUTE OF TECHNOLOGY DEPARTMENT OF ECE TWO DAYS NATIONAL LEVEL WORKSHOP ON COMMUNICATIONS & IMAGE PROCESSING "CIPM 2017" - 2 What? Matlab can be fun... 1 Plot the Sine Function...

More information

Foundations of Math II

Foundations of Math II Foundations of Math II Unit 6b: Toolkit Functions Academics High School Mathematics 6.6 Warm Up: Review Graphing Linear, Exponential, and Quadratic Functions 2 6.6 Lesson Handout: Linear, Exponential,

More information

A Quick Guide to Gnuplot. Andrea Mignone Physics Department, University of Torino AA

A Quick Guide to Gnuplot. Andrea Mignone Physics Department, University of Torino AA A Quick Guide to Gnuplot Andrea Mignone Physics Department, University of Torino AA 2017-2018 What is Gnuplot? Gnuplot is a free, command-driven, interactive, function and data plotting program, providing

More information

Plotting - Practice session

Plotting - Practice session Plotting - Practice session Alessandro Fanfarillo - Salvatore Filippone fanfarillo@ing.uniroma2.it May 28th, 2013 (fanfarillo@ing.uniroma2.it) Plotting May 28th, 2013 1 / 14 Plot function The basic function

More information

Math 1020 Objectives & Exercises Calculus Concepts Spring 2019

Math 1020 Objectives & Exercises Calculus Concepts Spring 2019 Section of Textbook 1.1 AND Learning Objectives/Testable Skills Identify four representations of a function. Specify input and output variables, input and output descriptions, and input and output units.

More information

16.7 OC680 Assignment 6, Due Wednesday Feb. 28

16.7 OC680 Assignment 6, Due Wednesday Feb. 28 292 CHAPTER 16. NOTES Figure 16.30: Profiles of (a) velocity and (b) shear for the separating boundary layer. 16.7 OC680 Assignment 6, Due Wednesday Feb. 28 1: Instability of a separating boundary layer

More information

tutorial i: Using matcont for numerical integration of ODEs

tutorial i: Using matcont for numerical integration of ODEs tutorial i: Using matcont for numerical integration of ODEs u.a. Kuznetsov Department of Mathematics Utrecht University Budapestlaan TA, Utrecht September, This session illustrates how to input a system

More information

Stokes Modelling Workshop

Stokes Modelling Workshop Stokes Modelling Workshop 14/06/2016 Introduction to Matlab www.maths.nuigalway.ie/modellingworkshop16/files 14/06/2016 Stokes Modelling Workshop Introduction to Matlab 1 / 16 Matlab As part of this crash

More information

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation CDA6530: Performance Models of Computers and Networks Chapter 4: Using Matlab for Performance Analysis and Simulation Objective Learn a useful tool for mathematical analysis and simulation Interpreted

More information

Introduction to Octave/Matlab. Deployment of Telecommunication Infrastructures

Introduction to Octave/Matlab. Deployment of Telecommunication Infrastructures Introduction to Octave/Matlab Deployment of Telecommunication Infrastructures 1 What is Octave? Software for numerical computations and graphics Particularly designed for matrix computations Solving equations,

More information

Math 230 Final Exam December 22, 2015

Math 230 Final Exam December 22, 2015 Math 230 Final Exam December 22, 2015 General Directions. This is an open- book, open- notes, open- computer test. However, you may not communicate with any person, except me, during the test. You have

More information

1 >> Lecture 4 2 >> 3 >> -- Graphics 4 >> Zheng-Liang Lu 184 / 243

1 >> Lecture 4 2 >> 3 >> -- Graphics 4 >> Zheng-Liang Lu 184 / 243 1 >> Lecture 4 >> 3 >> -- Graphics 4 >> Zheng-Liang Lu 184 / 43 Introduction ˆ Engineers use graphic techniques to make the information easier to understand. ˆ With graphs, it is easy to identify trends,

More information

CSE 123. Plots in MATLAB

CSE 123. Plots in MATLAB CSE 123 Plots in MATLAB Easiest way to plot Syntax: ezplot(fun) ezplot(fun,[min,max]) ezplot(fun2) ezplot(fun2,[xmin,xmax,ymin,ymax]) ezplot(fun) plots the expression fun(x) over the default domain -2pi

More information

MATLAB Fundamentals. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University

MATLAB Fundamentals. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University MATLAB Fundamentals Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University Reference: 1. Applied Numerical Methods with MATLAB for Engineers, Chapter 2 &

More information

Chapter 8 Complex Numbers & 3-D Plots

Chapter 8 Complex Numbers & 3-D Plots EGR115 Introduction to Computing for Engineers Complex Numbers & 3-D Plots from: S.J. Chapman, MATLAB Programming for Engineers, 5 th Ed. 2016 Cengage Learning Topics Introduction: Complex Numbers & 3-D

More information

Chapter 2. MATLAB Fundamentals

Chapter 2. MATLAB Fundamentals Chapter 2. MATLAB Fundamentals Choi Hae Jin Chapter Objectives q Learning how real and complex numbers are assigned to variables. q Learning how vectors and matrices are assigned values using simple assignment,

More information

Lecture 3. Introduction to Matlab

Lecture 3. Introduction to Matlab Lecture 3 Introduction to Matlab Programming Today s Lecture Matlab programming Programming environment and search path M-file scripts and functions Flow control statements Function functions Programming

More information

Time-Saving Hint: Use the up-arrow on your keyboard to cycle through old commands.

Time-Saving Hint: Use the up-arrow on your keyboard to cycle through old commands. Introduction to Matlab by Dr. Adam Larios It is important to type all of the code as you go along. You will learn it better this way: your brain will make connections based on what your hands are physically

More information

Vocabulary Unit 2-3: Linear Functions & Healthy Lifestyles. Scale model a three dimensional model that is similar to a three dimensional object.

Vocabulary Unit 2-3: Linear Functions & Healthy Lifestyles. Scale model a three dimensional model that is similar to a three dimensional object. Scale a scale is the ratio of any length in a scale drawing to the corresponding actual length. The lengths may be in different units. Scale drawing a drawing that is similar to an actual object or place.

More information

Computational lab on complex numbers

Computational lab on complex numbers Computational lab on complex numbers SAK, physics 1140 March 15, 2010 1 Objective To learn how to use MATLAB as an advanced calculator and gain familiarity with complex numbers using MATLAB. 2 Introduction

More information

EE 301 Lab 1 Introduction to MATLAB

EE 301 Lab 1 Introduction to MATLAB EE 301 Lab 1 Introduction to MATLAB 1 Introduction In this lab you will be introduced to MATLAB and its features and functions that are pertinent to EE 301. This lab is written with the assumption that

More information

Lecture 6 MATLAB programming (4) Dr.Qi Ying

Lecture 6 MATLAB programming (4) Dr.Qi Ying Lecture 6 MATLAB programming (4) Dr.Qi Ying Objectives User-defined Functions Anonymous Functions Function name as an input argument Subfunctions and nested functions Arguments persistent variable Anonymous

More information

Solutions. Algebra II Journal. Module 2: Regression. Exploring Other Function Models

Solutions. Algebra II Journal. Module 2: Regression. Exploring Other Function Models Solutions Algebra II Journal Module 2: Regression Exploring Other Function Models This journal belongs to: 1 Algebra II Journal: Reflection 1 Before exploring these function families, let s review what

More information

2. Solve for x when x < 22. Write your answer in interval notation. 3. Find the distance between the points ( 1, 5) and (4, 3).

2. Solve for x when x < 22. Write your answer in interval notation. 3. Find the distance between the points ( 1, 5) and (4, 3). Math 6 Practice Problems for Final. Find all real solutions x such that 7 3 x = 5 x 3.. Solve for x when 0 4 3x

More information

Website.

Website. Admin stuff Questionnaire Name Email Math courses taken so far General academic trend (major) General interests What about Chaos interests you the most? What computing experience do you have? Website www.cse.ucsc.edu/classes/ams146/spring05/index.html

More information

Introduction to Matlab to Accompany Linear Algebra. Douglas Hundley Department of Mathematics and Statistics Whitman College

Introduction to Matlab to Accompany Linear Algebra. Douglas Hundley Department of Mathematics and Statistics Whitman College Introduction to Matlab to Accompany Linear Algebra Douglas Hundley Department of Mathematics and Statistics Whitman College August 27, 2018 2 Contents 1 Getting Started 5 1.1 Before We Begin........................................

More information

MMAE 540 Homework 9. Stefan Stevanovic. Nov. 20, 2014

MMAE 540 Homework 9. Stefan Stevanovic. Nov. 20, 2014 MMAE Homework Stefan Stevanovic Nov., Problem : Generate a PRM (Probabilistic Road Map) path planner that maps the path from the goal location (X, Y ) = (, ) to a final location (X, Y ) = (, ), with the

More information

SIAM WORKSHOP: XPP. Software for Simulating Differential Equations. Ian Price 18 October, 2009

SIAM WORKSHOP: XPP. Software for Simulating Differential Equations. Ian Price 18 October, 2009 SIAM WORKSHOP: XPP Software for Simulating Differential Equations Ian Price peccavo@gmail.com 18 October, 2009 Introduction XPP came into existence for the analysis of phase planes when studying differential

More information

MATLAB. Input/Output. CS101 lec

MATLAB. Input/Output. CS101 lec MATLAB CS101 lec24 Input/Output 2018-04-18 MATLAB Review MATLAB Review Question ( 1 2 3 4 5 6 ) How do we access 6 in this array? A A(2,1) B A(1,2) C A(3,2) D A(2,3) MATLAB Review Question ( 1 2 3 4 5

More information

Introduction to MATLAB

Introduction to MATLAB ELG 3125 - Lab 1 Introduction to MATLAB TA: Chao Wang (cwang103@site.uottawa.ca) 2008 Fall ELG 3125 Signal and System Analysis P. 1 Do You Speak MATLAB? MATLAB - The Language of Technical Computing ELG

More information

MATLAB Vocabulary. Gerald Recktenwald. Version 0.965, 25 February 2017

MATLAB Vocabulary. Gerald Recktenwald. Version 0.965, 25 February 2017 MATLAB Vocabulary Gerald Recktenwald Version 0.965, 25 February 2017 MATLAB is a software application for scientific computing developed by the Mathworks. MATLAB runs on Windows, Macintosh and Unix operating

More information

Topic 6: Calculus Integration Volume of Revolution Paper 2

Topic 6: Calculus Integration Volume of Revolution Paper 2 Topic 6: Calculus Integration Standard Level 6.1 Volume of Revolution Paper 1. Let f(x) = x ln(4 x ), for < x

More information

Computing Fundamentals Plotting

Computing Fundamentals Plotting Computing Fundamentals Plotting Salvatore Filippone salvatore.filippone@uniroma2.it 2014 2015 (salvatore.filippone@uniroma2.it) Plotting 2014 2015 1 / 14 Plot function The basic function to plot something

More information

Section 1.6. Inverse Functions

Section 1.6. Inverse Functions Section 1.6 Inverse Functions Important Vocabulary Inverse function: Let f and g be two functions. If f(g(x)) = x in the domain of g and g(f(x) = x for every x in the domain of f, then g is the inverse

More information

Signals and Systems Profs. Byron Yu and Pulkit Grover Fall Homework 1

Signals and Systems Profs. Byron Yu and Pulkit Grover Fall Homework 1 18-290 Signals and Systems Profs. Byron Yu and Pulkit Grover Fall 2018 Homework 1 This homework is due in class on Thursday, September 6, 9:00am. Instructions Solve all non-matlab problems using only paper

More information

The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development

The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Chapter 7 Graphics Learning outcomes Label your plots Create different

More information

Introduction to MatLab. Introduction to MatLab K. Craig 1

Introduction to MatLab. Introduction to MatLab K. Craig 1 Introduction to MatLab Introduction to MatLab K. Craig 1 MatLab Introduction MatLab and the MatLab Environment Numerical Calculations Basic Plotting and Graphics Matrix Computations and Solving Equations

More information

ALGEBRA II UNIT X: Conic Sections Unit Notes Packet

ALGEBRA II UNIT X: Conic Sections Unit Notes Packet Name: Period: ALGEBRA II UNIT X: Conic Sections Unit Notes Packet Algebra II Unit 10 Plan: This plan is subject to change at the teacher s discretion. Section Topic Formative Work Due Date 10.3 Circles

More information

Continuity and Tangent Lines for functions of two variables

Continuity and Tangent Lines for functions of two variables Continuity and Tangent Lines for functions of two variables James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University April 4, 2014 Outline 1 Continuity

More information

EE 350. Continuous-Time Linear Systems. Recitation 1. 1

EE 350. Continuous-Time Linear Systems. Recitation 1. 1 EE 350 Continuous-Time Linear Systems Recitation 1 Recitation 1. 1 Recitation 1 Topics MATLAB Programming Basic Operations, Built-In Functions, and Variables m-files Graphics: 2D plots EE 210 Review Branch

More information

PROGRAMMING WITH MATLAB WEEK 6

PROGRAMMING WITH MATLAB WEEK 6 PROGRAMMING WITH MATLAB WEEK 6 Plot: Syntax: plot(x, y, r.- ) Color Marker Linestyle The line color, marker style and line style can be changed by adding a string argument. to select and delete lines

More information

Download the complete code and the sample input files from the course web site. DE that we solve is

Download the complete code and the sample input files from the course web site. DE that we solve is METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. Sert) Handout 4 1D FEM Code and a Sample Input File Download the complete code and the sample input

More information