ECE 102 Engineering Computation

Size: px
Start display at page:

Download "ECE 102 Engineering Computation"

Transcription

1 ECE 102 Engineering Computation Phillip Wong MATLAB XY Plots with Linear-Linear Scaling Formatting Plots XY Plots with Logarithmic Scaling Multiple Plots Printing and Saving Plots

2 Introduction to 2D Graphs MATLAB supports 2D and 3D graphs for visualizing data sets. Available 2D graph types include: XY Scatter Stem Line Pie Histogram Bar Polar Contour There are extensive options for customizing the appearance of a graph. 1

3 XY Plots with Linear-Linear Scaling Linear XY plots: plot(x,y) The axes are linear in both xand y. xand yare vectors of the same length. x contains the independent data values. y contains the dependent data values. The plot appears in the Figure Window. 2

4 Enhanced plot command: plot(x,y,'propertyname',value) -orplot(x,y,'specifiers') PropertyName, Value set individual line and marker properties (e.g., style, color). Specifiersquickly define line and marker properties in a single string. XY plot with primary and secondary Y axes: plotyy(x1,y1,x2,y2) 3

5 Line Property Names: LineStyle LineWidth Color Value Description Color 'b' 'r' blue (default) red Style Value '-' '--' ':' '-.' 'none' Description solid (default) dashed dotted dash-dot no line 'g' 'c' 'm' 'y' 'k' 'w' green cyan magenta yellow black white Width Value Description 1 thinnest (default) 2 to 100 thicker line [R,G,B] R = Red (0 to 1) G = Green (0 to 1) B = Blue (0 to 1) 4

6 Marker Property Names: Marker MarkerSize MarkerEdgeColor MarkerFaceColor Marker size is an integer starting at 1. Marker color values are the same as the line color values. Marker Value '+' 'o' '*' '.' 'x' 's' 'd' '^' 'v' '>' '<' 'p' 'h' Description plus sign circle asterisk point cross square diamond triangle-up triangle-down triangle-right triangle-left 5-point star 6-point star 5

7 Example: x = -2*pi:pi/24:2*pi; y = sinc(x); plot(x,y) Blue solid line, no markers plot(x,y,'linestyle',':','color','r') Red dotted line, no markers plot(x,y,':r') Red dotted line, no markers plot(x,y,'om') plot(x,y,'-sk') No line, magenta circle markers Black solid line, black square markers 6

8 plot(x,y) plot(x,y,'linestyle',':','color','r') -orplot(x,y,':r') 7

9 plot(x,y,'om') plot(x,y,'-sk') 8

10 Formatting Plots Clear Figure clf Erases the Figure window New Figure figure(n) Opens a new figure window (index n) (optional if only one figure needed) Axis Grid Lines grid on Adds major grid lines grid minor Toggles minor grid lines grid off Removes all grid lines 9

11 Axis Limits axis([xmin xmax ymin ymax]) xmin xmax ymaxorymin yminorymax Note: Limits are specified in a vector. All four limits must be present. If a particular limit is specified as +inf or inf, then its value is autoset. Variations: axis auto axis xy axis ij Sets both axes limits automatically Sets origin to lower left corner Sets origin to upper left corner 10

12 Axis Labels xlabel('x axis text string') ylabel('y axis text string') Title title('one line text string') title({'two lines', 'of text'}) brace comma Text Box text(xpos,ypos,'text string') brace Note: xposand yposare coordinates relative to the graph s origin where the text should appear. 11

13 Greek characters and subscripts/superscripts can be displayed in text by embedding special sequences in the string. Symbol Sequence Symbol Sequence Symbol Sequence α \alpha ρ \rho ϒ \Upsilon β \beta σ \sigma Φ \Phi γ \gamma τ \tau Ψ \Psi δ \delta υ \upsilon Ω \Omega ɛ \epsilon φ \phi ζ \zeta χ \chi η \eta ψ \psi θ \theta ω \omega ι \iota Γ \Gamma κ \kappa Δ \Delta λ \lambda Θ \Theta µ \mu Λ \Lambda ν \nu Ξ \Xi ξ \xi Π \Pi Subscript _{text} π \pi Σ \Sigma Superscript ^{text} 12

14 Text Font Property Names: FontName FontSize FontAngle FontWeight Name Value Description Angle Value Description 'Helvetica' 'Times' 'Courier' 'FixedWidth' Helvetica font Times font Courier font Localized fixed font 'normal' 'italic' 'oblique' normal (default) slanted font slanted font Size Value Description 1 to 128 font point size Weight Value 'normal' 'demi' 'bold' Description normal (default) bold font bold font 13

15 Example: Plot 2 α 0 = e where 20 α 0 5 I g 2 Before formatting % Initialize data alpha_0 = -20:0.1:5; Ig = 2 * exp(-alpha_0.^2); % Basic plot clf plot(alpha_0, Ig) % Formatting axis([ ]) title('graph of y = 2exp(-\alpha_{0}^{2})',... 'FontName', 'Helvetica', 'FontSize', 14) xlabel('position \alpha_{0} (mm)', 'FontWeight', 'Bold') ylabel('intensity I_g (mw/mm^2)') text(0.3, 2, 'Peak value') 14

16 After formatting 15

17 XY Plots with Logarithmic Scaling XY plots with at least one log scale: semilogx(x,y) semilogy(x,y) loglog(x,y) log x, linear y linear x, log y log x, log y xand yare vectors of the same length. x contains the independent data values. y contains the dependent data values. 16

18 Example: Plot y = e x for 0 x 10. Try different scales. x = 1:10; y = exp(x); figure(1) plot(x,y,'-^','markerfacecolor','red'); grid on xlabel('x'); ylabel('y=exp(x)'); title('linear Scales') figure(2) semilogy(x,y,'-^','markerfacecolor','green'); grid on xlabel('x'); ylabel('y=exp(x)'); title('semilogy Scales') 17

19 18

20 Multiple Lines in the Same Plot Method #1: plot command plot(x1,y1,'spec',x2,y2,'spec', ) All the lines are overlaid on the same plot. Each line can have its own specifiers. 19

21 Adding a Legend legend('str1','str2', ) Variations: legend('str','location', Loc_Value) Loc_Value is a predefined value that puts the legend at a specific location on the plot. legend('off') legend('show') legend('boxoff') legend('boxon') Turn off legend Show legend Remove box from legend Add box around legend 20

22 Allowed legend location values: Location Value Description Location Value Description 'North' Inside top 'EastOutside' Outside right 'South' Inside bottom 'WestOutside' Outside left 'East' Inside right 'NorthEastOutside' Outside top right 'West' Inside left 'NorthWestOutside' Outside top left 'NorthEast' Inside top right 'SouthEastOutside' Outside bottom right 'NorthWest' Inside top left 'SouthWestOutside' Outside bottom left 'SouthEast' Inside bottom right 'Best' Least conflict 'SouthWest' Inside bottom left 'BestOutside' Least unused space 'NorthOutside' Outside top 'SouthOutside' Outside bottom 21

23 Example: Plot y 1 = 3x 3-26x + 10, y 2 = 9x 2-26, and y 3 = 18x over the interval-2 x 4. x = -2:0.01:4; y1 = 3*x.^3-26*x+10; y2 = 9*x.^2-26; y3 = 18*x; plot(x,y1,'-b', x,y2,'--r', x,y3,':k') xlabel('x') ylabel('y and its derivatives') title('multiple Graphs plot()') 22

24 23

25 Method #2: hold command hold on Each new plot command adds a graph that is overlaid on the current graph (Place this after the first plot command) hold off Turns off hold mode, so each plot command creates a new graph 24

26 Example: Plot sin(2πt) and cos(2πt) on the same graph over the interval -π t +π. t = -pi:0.01:pi; y1 = sin(2*pi*t); y2 = cos(2*pi*t); plot(t,y1,'r') axis([-pi pi ]) hold on plot(t,y2,':b') title('multiple Graphs - hold') xlabel('time (seconds)') ylabel('amplitude (Volts)') legend('sin','cos','location','northeastoutside') hold off 25

27 26

28 Example: VD = 0.6:0.005:0.8; % V : Applied diode voltage k = e-23; % J/K : Boltzmann's constant q = e-19; % C : Electric charge IS = 1.0e-12; % A : Reverse saturation current I1 = IS * (exp(vd / (k*250/q)) - 1); % A : Diode T = 250 K I2 = IS * (exp(vd / (k*255/q)) - 1); % A : Diode T = 255 K I3 = IS * (exp(vd / (k*260/q)) - 1); % A : Diode T = 260 K clf grid on plot(vd,i1,'r','linewidth',2) axis([ e3]) hold on plot(vd,i2,'--m','linewidth',2) plot(vd,i3,':b','linewidth',2) xlabel('applied diode voltage V_{D} (V)','FontSize',12) ylabel('diode current I_{D} (A)','FontSize',12) title({'dependence of diode current on temperature T',... 'Parameters: I_{S} = 1 pa, Ideality factor \eta = 1'},... 'FontSize',14) legend('t=250 K','T=255 K','T=260K','Location','Best') hold off I( V D ) = I S e V D kt q 1 27

29 28

30 Method #3: line command line(x,y,'propertyname',value) Adds an additional line to a pre-existing plot. 29

31 Example: Plot y 1 = x, y 2 = x 2, and y 3 = x 3 over -2 x 2. x = -2:0.01:2; y1 = x; y2 = x.^2; y3 = x.^3; plot(x,y1,'linestyle','-','color','r','linewidth',1) line(x,y2,'linestyle','--','color','c','linewidth',2) line(x,y3,'linestyle',':','color','m','linewidth',3) xlabel('x'); ylabel('powers of y') title('multiple Graphs line()') 30

32 31

33 Multiple Plots on the Same Page subplot command subplot(m,n,k) Places the plot as a tile at position kon an m ngrid Example: 2 2 grid: (2,2,1) (2,2,2) (2,2,3) (2,2,4) 2 3 grid: (2,3,1) (2,3,2) (2,3,3) (2,3,4) (2,3,5) (2,3,6) 32

34 Example: Plot y 1 = x 2 and y 2 = x sin(4x) as 1 2 tiled graphs over the interval 0 x 10. x = 0:0.1:10; y1 = x.^2; y2 = x.*sin(4*x); subplot(1,2,1); plot(x,y1,'--') xlabel('x'); ylabel('y1=x^2') title('tile 1 subplot(1,2,1)') subplot(1,2,2); plot(x,y2,':') xlabel('x'); ylabel('y2=xsin(4x)') title('tile 2 subplot(1,2,2)') 33

35 34

36 Printing and Saving Plots To send the current plot to the printer: print To save the current plot to an image file: print dtype filename type = ps, psc, eps, epsc, tiff, jpeg, png Example: print djpeg myplot Image files are saved to the current directory. 35

COMP MATLAB.

COMP MATLAB. COMP1131 MATLAB chenyang@fudan.edu.cn 1 2 (x, y ) [(x 1,y 1 ) (x 2,y 2 ) (x n,y n )] Y=f(X) X [x 1,x 2,...,x n ] Y [y 1,y 2,,y n ] 3 MATLAB 4 figure figure figure(n): n figure(n) 5 y = x + sin x (x [ π

More information

Mathematics Review Exercises. (answers at end)

Mathematics Review Exercises. (answers at end) Brock University Physics 1P21/1P91 Mathematics Review Exercises (answers at end) Work each exercise without using a calculator. 1. Express each number in scientific notation. (a) 437.1 (b) 563, 000 (c)

More information

Entities for Symbols and Greek Letters

Entities for Symbols and Greek Letters Entities for Symbols and Greek Letters The following table gives the character entity reference, decimal character reference, and hexadecimal character reference for symbols and Greek letters, as well

More information

Contents. basic algebra. Learning outcomes. Time allocation. 1. Mathematical notation and symbols. 2. Indices. 3. Simplification and factorisation

Contents. basic algebra. Learning outcomes. Time allocation. 1. Mathematical notation and symbols. 2. Indices. 3. Simplification and factorisation basic algebra Contents. Mathematical notation and symbols 2. Indices 3. Simplification and factorisation 4. Arithmetic of algebraic fractions 5. Formulae and transposition Learning outcomes In this workbook

More information

T m / A. Table C2 Submicroscopic Masses [2] Symbol Meaning Best Value Approximate Value

T m / A. Table C2 Submicroscopic Masses [2] Symbol Meaning Best Value Approximate Value APPENDIX C USEFUL INFORMATION 1247 C USEFUL INFORMATION This appendix is broken into several tables. Table C1, Important Constants Table C2, Submicroscopic Masses Table C3, Solar System Data Table C4,

More information

1 Integration of Rational Functions Using Partial Fractions

1 Integration of Rational Functions Using Partial Fractions MTH Fall 008 Essex County College Division of Mathematics Handout Version 4 September 8, 008 Integration of Rational Functions Using Partial Fractions In the past it was far more usual to simplify or combine

More information

CSSS/STAT/SOC 321 Case-Based Social Statistics I. Levels of Measurement

CSSS/STAT/SOC 321 Case-Based Social Statistics I. Levels of Measurement CSSS/STAT/SOC 321 Case-Based Social Statistics I Levels of Measurement Christopher Adolph Department of Political Science and Center for Statistics and the Social Sciences University of Washington, Seattle

More information

AP Physics 1 Summer Assignment. Directions: Find the following. Final answers should be in scientific notation. 2.)

AP Physics 1 Summer Assignment. Directions: Find the following. Final answers should be in scientific notation. 2.) AP Physics 1 Summer Assignment DUE THE FOURTH DAY OF SCHOOL- 2018 Purpose: The purpose of this packet is to make sure that we all have a common starting point and understanding of some of the basic concepts

More information

Quantum Mechanics for Scientists and Engineers. David Miller

Quantum Mechanics for Scientists and Engineers. David Miller Quantum Mechanics for Scientists and Engineers David Miller Background mathematics Basic mathematical symbols Elementary arithmetic symbols Equals Addition or plus 3 5 Subtraction, minus or less 3 or Multiplication

More information

Outline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification

Outline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification Logic Aart Middeldorp Vincent van Oostrom Franziska Rapp Christian Sternagel Department of Computer Science University of Innsbruck WS 2017/2018 AM (DCS @ UIBK) week 11 2/38 Definitions elimination x φ

More information

Physics 241 Class #10 Outline (9/25/2013) Plotting Handle graphics Numerical derivatives and functions Next time numerical integrals

Physics 241 Class #10 Outline (9/25/2013) Plotting Handle graphics Numerical derivatives and functions Next time numerical integrals Physics 241 Class #10 Outline (9/25/2013) Plotting Handle graphics Numerical derivatives and functions Next time numerical integrals Announcements HW4 grades are up. HW5a HW5 revised Same problems, now

More information

UKMT Junior Mentoring Scheme Notes

UKMT Junior Mentoring Scheme Notes UKMT Junior Mentoring Scheme Notes. Even, odd and prime numbers If a sum or difference of a pair of numbers is even, then both numbers are even or both are odd. To get an odd sum, one must be even and

More information

GRAPHIC WEEK 7 DR. USMAN ULLAH SHEIKH DR. MUSA MOHD MOKJI DR. MICHAEL TAN LOONG PENG DR. AMIRJAN NAWABJAN DR. MOHD ADIB SARIJARI

GRAPHIC WEEK 7 DR. USMAN ULLAH SHEIKH DR. MUSA MOHD MOKJI DR. MICHAEL TAN LOONG PENG DR. AMIRJAN NAWABJAN DR. MOHD ADIB SARIJARI GRAPHIC SKEE1022 SCIENTIFIC PROGRAMMING WEEK 7 DR. USMAN ULLAH SHEIKH DR. MUSA MOHD MOKJI DR. MICHAEL TAN LOONG PENG DR. AMIRJAN NAWABJAN DR. MOHD ADIB SARIJARI 1 OBJECTIVE 2-dimensional line plot function

More information

General Physics. Prefixes. Aims: The Greek Alphabet Units. Provided Data

General Physics. Prefixes. Aims: The Greek Alphabet Units. Provided Data General Physics Aims: The Greek Alphabet Units Prefixes Provided Data Name Upper Case Lower Case The Greek Alphabet When writing equations and defining terms, letters from the Greek alphabet are often

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

Using Structural Equation Modeling to Conduct Confirmatory Factor Analysis

Using Structural Equation Modeling to Conduct Confirmatory Factor Analysis Using Structural Equation Modeling to Conduct Confirmatory Factor Analysis Advanced Statistics for Researchers Session 3 Dr. Chris Rakes Website: http://csrakes.yolasite.com Email: Rakes@umbc.edu Twitter:

More information

Two Mathematical Constants

Two Mathematical Constants 1 Two Mathematical Constants Two of the most important constants in the world of mathematics are π (pi) and e (Euler s number). π = 3.14159265358979323846264338327950288419716939937510... e = 2.71828182845904523536028747135266249775724709369995...

More information

Introductory Unit for A Level Physics

Introductory Unit for A Level Physics Introductory Unit for A Level Physics Name: 1 Physics Year 12 Induction Objectives: To give you the skills needed for the successful study of Physics at A level. To help you to identify areas in which

More information

These variables have specific names and I will be using these names. You need to do this as well.

These variables have specific names and I will be using these names. You need to do this as well. Greek Letters In Physics, we use variables to denote a variety of unknowns and concepts. Many of these variables are letters of the Greek alphabet. If you are not familiar with these letters, you should

More information

or R n +, R n ++ etc.;

or R n +, R n ++ etc.; Mathematical Prerequisites for Econ 7005, Microeconomic Theory I, and Econ 7007, Macroeconomic Theory I, at the University of Utah by Gabriel A Lozada The contents of Sections 1 6 below are required for

More information

. var save filename var. y fprintf(fl,'%f %f\n',y) y ..TXT. . fprintf() .TXT. myf = fopen('nam.txt','w'); nam.txt myf.

. var save filename var. y fprintf(fl,'%f %f\n',y) y ..TXT. . fprintf() .TXT. myf = fopen('nam.txt','w'); nam.txt myf. y fprintf(fl,'%f %f\n',y) y. \n.txt. fprintf()..txt.. myf = fopen('nam.txt','w'); :. (1-4 )..TXT. % Optt.m av =[17.4537 4.57 15.3 17.869 3.7]; Tit = 'Students Average:'; myf = fopen('nam.txt','w'); fprintf(myf,'%s\n',tit);

More information

MI&CCMIllILIL&JN CHEMISTRY

MI&CCMIllILIL&JN CHEMISTRY MI&CCMIllILIL&JN IQ)llCClrll(Q)JN&IRl)1 @IF CHEMISTRY MACCMIIJ1J1A~ JTI)nCClln@~Aill)! (Q)]F CHEMISTRY D.B. HIBBERT & A.M. JAMES M MACMILLAN REFERENCE BOOKS The Macmillan Press Ltd, 1987 All rights reserved.

More information

Matlab for Review. NDSU Matlab Review pg 1

Matlab for Review. NDSU Matlab Review pg 1 NDSU Matlab Review pg 1 Becoming familiar with MATLAB The console The editor The graphics windows The help menu Saving your data (diary) General environment and the console Matlab for Review Simple numerical

More information

FLUIDS Problem Set #3 SOLUTIONS 10/27/ v y = A A = 0. + w z. Y = C / x

FLUIDS Problem Set #3 SOLUTIONS 10/27/ v y = A A = 0. + w z. Y = C / x FLUIDS 2009 Problem Set #3 SOLUTIONS 10/27/2009 1.i. The flow is clearly incompressible because iu = u x + v y + w z = A A = 0 1.ii. The equation for a streamline is dy dx = Y. Guessing a solution of the

More information

Name: AST 114 Date: THE DEEP SKY

Name: AST 114 Date: THE DEEP SKY Name: AST 114 Date: THE DEEP SKY The purpose of this lab is to familiarize the student with the use of the planisphere, sky atlas, and coordinate systems for the night sky and introduce the student to

More information

Essential Maths 1. Macquarie University MAFC_Essential_Maths Page 1 of These notes were prepared by Anne Cooper and Catriona March.

Essential Maths 1. Macquarie University MAFC_Essential_Maths Page 1 of These notes were prepared by Anne Cooper and Catriona March. Essential Maths 1 The information in this document is the minimum assumed knowledge for students undertaking the Macquarie University Masters of Applied Finance, Graduate Diploma of Applied Finance, and

More information

Introduction to MatLab

Introduction to MatLab Introduction to MatLab 1 Introduction to MatLab Graduiertenkolleg Kognitive Neurobiologie Friday, 05 November 2004 Thuseday, 09 Novemer 2004 Kurt Bräuer Institut für Theoretische Physik, Universität Tübingen

More information

The statmath package

The statmath package The statmath package Sebastian Ankargren sebastian.ankargren@statistics.uu.se March 8, 2018 Abstract Applied and theoretical papers in statistics usually contain a number of notational conventions which

More information

Computational Foundations of Cognitive Science

Computational Foundations of Cognitive Science Computational Foundations of Cognitive Science Lecture 14: Inverses and Eigenvectors in Matlab; Plotting and Graphics Frank Keller School of Informatics University of Edinburgh keller@inf.ed.ac.uk February

More information

EEM Simple use of Matlab

EEM Simple use of Matlab EEM 123 - Simple use of Matlab 0) Starting Matlab and basic operations Matlab is a powerful engineering tool, specifically designed to allow engineers to make simulations closest to the real world while

More information

How to Make or Plot a Graph or Chart in Excel

How to Make or Plot a Graph or Chart in Excel This is a complete video tutorial on How to Make or Plot a Graph or Chart in Excel. To make complex chart like Gantt Chart, you have know the basic principles of making a chart. Though I have used Excel

More information

CZECHOSLOVAK JOURNAL OF PHYSICS. Instructions for authors

CZECHOSLOVAK JOURNAL OF PHYSICS. Instructions for authors CZECHOSLOVAK JOURNAL OF PHYSICS Instructions for authors The Czechoslovak Journal of Physics is published monthly. It comprises original contributions, both regular papers and letters, as well as review

More information

Run bayesian parameter estimation

Run bayesian parameter estimation Matlab: R11a IRIS: 8.11519 Run bayesian parameter estimation [estimate_params.m] by Jaromir Benes May 11 Introduction In this m-le, we use bayesian methods to estimate some of the parameters. First, we

More information

Lab 2: Static Response, Cantilevered Beam

Lab 2: Static Response, Cantilevered Beam Contents 1 Lab 2: Static Response, Cantilevered Beam 3 1.1 Objectives.......................................... 3 1.2 Scalars, Vectors and Matrices (Allen Downey)...................... 3 1.2.1 Attribution.....................................

More information

AQA 7407/7408 MEASUREMENTS AND THEIR ERRORS

AQA 7407/7408 MEASUREMENTS AND THEIR ERRORS AQA 7407/7408 MEASUREMENTS AND THEIR ERRORS Year 12 Physics Course Preparation 2018 Name: Textbooks will be available from the school library in September They are AQA A level Physics Publisher: Oxford

More information

An Introduction to MatLab

An Introduction to MatLab Introduction to MatLab 1 An Introduction to MatLab Contents 1. Starting MatLab... 3 2. Workspace and m-files... 4 3. Help... 5 4. Vectors and Matrices... 5 5. Objects... 8 6. Plots... 10 7. Statistics...

More information

Joy Allen. March 12, 2015

Joy Allen. March 12, 2015 LATEX Newcastle University March 12, 2015 Why use L A TEX? Extremely useful tool for writing scientific papers, presentations and PhD Thesis which are heavily laden with mathematics You get lovely pretty

More information

HOMEWORK 3: Phase portraits for Mathmatical Models, Analysis and Simulation, Fall 2010 Report due Mon Oct 4, Maximum score 7.0 pts.

HOMEWORK 3: Phase portraits for Mathmatical Models, Analysis and Simulation, Fall 2010 Report due Mon Oct 4, Maximum score 7.0 pts. HOMEWORK 3: Phase portraits for Mathmatical Models, Analysis and Simulation, Fall 2010 Report due Mon Oct 4, 2010. Maximum score 7.0 pts. Three problems are to be solved in this homework assignment. The

More information

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Part I: Basics MATLAB Environment Getting Help Variables Vectors, Matrices, and

More information

Homework 1 Solutions

Homework 1 Solutions 18-9 Signals and Systems Profs. Byron Yu and Pulkit Grover Fall 18 Homework 1 Solutions Part One 1. (8 points) Consider the DT signal given by the algorithm: x[] = 1 x[1] = x[n] = x[n 1] x[n ] (a) Plot

More information

Assignment 1b: due Tues Nov 3rd at 11:59pm

Assignment 1b: due Tues Nov 3rd at 11:59pm n Today s Lecture: n n Vectorized computation Introduction to graphics n Announcements:. n Assignment 1b: due Tues Nov 3rd at 11:59pm 1 Monte Carlo Approximation of π Throw N darts L L/2 Sq. area = N =

More information

DIRECTING SUN PANELS

DIRECTING SUN PANELS sunpan, April 9, 2015 1 DIRECTING SUN PANELS GERRIT DRAISMA 1. Introduction The quantity of sun light captured by sun panels depends on intensity and direction of solar radiation, area of the panels, and

More information

Vector Spaces. 1 Theory. 2 Matlab. Rules and Operations

Vector Spaces. 1 Theory. 2 Matlab. Rules and Operations Vector Spaces Rules and Operations 1 Theory Recall that we can specify a point in the plane by an ordered pair of numbers or coordinates (x, y) and a point in space with an order triple of numbers (x,

More information

V = IR. There are some basic equations that you will have to learn for the exams. These are written down for you at the back of the Physics Guide.

V = IR. There are some basic equations that you will have to learn for the exams. These are written down for you at the back of the Physics Guide. Physics Induction Please look after this booklet ypu will need to hand it in on your return to school in September and will need to get a pass to continue on the AS cours 1 Physics Induction Objectives:

More information

Lab 6: Linear Algebra

Lab 6: Linear Algebra 6.1 Introduction Lab 6: Linear Algebra This lab is aimed at demonstrating Python s ability to solve linear algebra problems. At the end of the assignment, you should be able to write code that sets up

More information

Introduction to GNU Octave

Introduction to GNU Octave Introduction to GNU Octave A brief tutorial for linear algebra and calculus students by Jason Lachniet Introduction to GNU Octave A brief tutorial for linear algebra and calculus students Jason Lachniet

More information

1.1 The Language of Mathematics Expressions versus Sentences

1.1 The Language of Mathematics Expressions versus Sentences The Language of Mathematics Expressions versus Sentences a hypothetical situation the importance of language Study Strategies for Students of Mathematics characteristics of the language of mathematics

More information

S(c)/ c = 2 J T r = 2v, (2)

S(c)/ c = 2 J T r = 2v, (2) M. Balda LMFnlsq Nonlinear least squares 2008-01-11 Let us have a measured values (column vector) y depent on operational variables x. We try to make a regression of y(x) by some function f(x, c), where

More information

Laboratory handout 1 Mathematical preliminaries

Laboratory handout 1 Mathematical preliminaries laboratory handouts, me 340 2 Laboratory handout 1 Mathematical preliminaries In this handout, an expression on the left of the symbol := is defined in terms of the expression on the right. In contrast,

More information

An area chart emphasizes the trend of each value over time. An area chart also shows the relationship of parts to a whole.

An area chart emphasizes the trend of each value over time. An area chart also shows the relationship of parts to a whole. Excel 2003 Creating a Chart Introduction Page 1 By the end of this lesson, learners should be able to: Identify the parts of a chart Identify different types of charts Create an Embedded Chart Create a

More information

. α β γ δ ε ζ η θ ι κ λ μ Aμ ν(x) ξ ο π ρ ς σ τ υ φ χ ψ ω. Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω. Friday April 1 ± ǁ

. α β γ δ ε ζ η θ ι κ λ μ Aμ ν(x) ξ ο π ρ ς σ τ υ φ χ ψ ω. Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω. Friday April 1 ± ǁ . α β γ δ ε ζ η θ ι κ λ μ Aμ ν(x) ξ ο π ρ ς σ τ υ φ χ ψ ω. Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω Friday April 1 ± ǁ 1 Chapter 5. Photons: Covariant Theory 5.1. The classical fields 5.2. Covariant

More information

TikZ Tutorial. KSETA Doktorandenworkshop 2014 Christian Amstutz, Tanja Harbaum, Ewa Holt July 21,

TikZ Tutorial. KSETA Doktorandenworkshop 2014 Christian Amstutz, Tanja Harbaum, Ewa Holt July 21, TikZ Tutorial KSETA Doktorandenworkshop 2014 Christian Amstutz, Tanja Harbaum, Ewa Holt July 21, 2014 KIT University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association

More information

Solving Differential Equations on 2-D Geometries with Matlab

Solving Differential Equations on 2-D Geometries with Matlab Solving Differential Equations on 2-D Geometries with Matlab Joshua Wall Drexel University Philadelphia, PA 19104 (Dated: April 28, 2014) I. INTRODUCTION Here we introduce the reader to solving partial

More information

1 Mathematical styles

1 Mathematical styles 1 Mathematical styles Inline mathematics is typeset using matched pairs of dollar signs $. An alternate punctuation is \( and \) which are better suited for editors with syntax highlighting. We now introduce

More information

2.1 Identifying Patterns

2.1 Identifying Patterns I. Foundations for Functions 2.1 Identifying Patterns: Leaders' Notes 2.1 Identifying Patterns Overview: Objective: s: Materials: Participants represent linear relationships among quantities using concrete

More information

L3: Review of linear algebra and MATLAB

L3: Review of linear algebra and MATLAB L3: Review of linear algebra and MATLAB Vector and matrix notation Vectors Matrices Vector spaces Linear transformations Eigenvalues and eigenvectors MATLAB primer CSCE 666 Pattern Analysis Ricardo Gutierrez-Osuna

More information

Complex Numbers. Visualize complex functions to estimate their zeros and poles.

Complex Numbers. Visualize complex functions to estimate their zeros and poles. Lab 1 Complex Numbers Lab Objective: Visualize complex functions to estimate their zeros and poles. Polar Representation of Complex Numbers Any complex number z = x + iy can be written in polar coordinates

More information

EEE161 Applied Electromagnetics Laboratory 1

EEE161 Applied Electromagnetics Laboratory 1 Dr. Milica Marković Applied Electromagnetics Laboratory page 1 EEE161 Applied Electromagnetics Laboratory 1 Instructor: Dr. Milica Marković Office: Riverside Hall 3028 Email: milica@csus.edu Web:http://gaia.ecs.csus.edu/

More information

Complex Numbers. A complex number z = x + iy can be written in polar coordinates as re i where

Complex Numbers. A complex number z = x + iy can be written in polar coordinates as re i where Lab 20 Complex Numbers Lab Objective: Create visualizations of complex functions. Visually estimate their zeros and poles, and gain intuition about their behavior in the complex plane. Representations

More information

Further Maths A2 (M2FP2D1) Assignment ψ (psi) A Due w/b 19 th March 18

Further Maths A2 (M2FP2D1) Assignment ψ (psi) A Due w/b 19 th March 18 α β γ δ ε ζ η θ ι κ λ µ ν ξ ο π ρ σ τ υ ϕ χ ψ ω The mathematician s patterns, like the painter s or the poet s, must be beautiful: the ideas, like the colours or the words, must fit together in a harmonious

More information

Physics 1114 Chapter 0: Mathematics Review

Physics 1114 Chapter 0: Mathematics Review Physics 1114 Chapter 0: Mathematics Review 0.1 Exponents exponent: in N a, a is the exponent base number: in N a, N is the base number squared: when the exponent is 2 cube: when the exponent is 3 square

More information

Production of this 2015 edition, containing corrections and minor revisions of the 2008 edition, was funded by the sigma Network.

Production of this 2015 edition, containing corrections and minor revisions of the 2008 edition, was funded by the sigma Network. About the HELM Project HELM (Helping Engineers Learn Mathematics) materials were the outcome of a three- year curriculum development project undertaken by a consortium of five English universities led

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

Matlab Sheet 3 - Solution. Plotting in Matlab

Matlab Sheet 3 - Solution. Plotting in Matlab f(x) Faculty of Engineering Spring 217 Mechanical Engineering Department Matlab Sheet 3 - Solution Plotting in Matlab 1. a. Estimate the roots of the following equation by plotting the equation. x 3 3x

More information

and in each case give the range of values of x for which the expansion is valid.

and in each case give the range of values of x for which the expansion is valid. α β γ δ ε ζ η θ ι κ λ µ ν ξ ο π ρ σ τ υ ϕ χ ψ ω Mathematics is indeed dangerous in that it absorbs students to such a degree that it dulls their senses to everything else P Kraft Further Maths A (MFPD)

More information

LAB 1: MATLAB - Introduction to Programming. Objective:

LAB 1: MATLAB - Introduction to Programming. Objective: LAB 1: MATLAB - Introduction to Programming Objective: The objective of this laboratory is to review how to use MATLAB as a programming tool and to review a classic analytical solution to a steady-state

More information

Experiment 1: Linear Regression

Experiment 1: Linear Regression Experiment 1: Linear Regression August 27, 2018 1 Description This first exercise will give you practice with linear regression. These exercises have been extensively tested with Matlab, but they should

More information

ECE2111 Signals and Systems UMD, Spring 2013 Experiment 1: Representation and manipulation of basic signals in MATLAB

ECE2111 Signals and Systems UMD, Spring 2013 Experiment 1: Representation and manipulation of basic signals in MATLAB ECE2111 Signals and Systems UMD, Spring 2013 Experiment 1: Representation and manipulation of basic signals in MATLAB MATLAB is a tool for doing numerical computations with matrices and vectors. It can

More information

. D CR Nomenclature D 1

. D CR Nomenclature D 1 . D CR Nomenclature D 1 Appendix D: CR NOMENCLATURE D 2 The notation used by different investigators working in CR formulations has not coalesced, since the topic is in flux. This Appendix identifies the

More information

TRANSITION GUIDE

TRANSITION GUIDE HEATHCOTE SCHOOL & SCIENCE COLLEGE AQA A LEVEL PHYSICS TRANSITION GUIDE 2017-2018 Name: Teacher/s: 1 Transition guide: Physics We have created this student support resource to help you make the transition

More information

Equation Sheet For Quizzes and Tests

Equation Sheet For Quizzes and Tests hapter : Aluminum.70 g/cm 3 opper 8.96 g/cm 3 Iron 7.87 g/cm 3 Equation Sheet For Quizzes and Tests You must have memorized the unit prefix values and the formulas related to circles, spheres, and rectangles.

More information

Linear Algebra. Jim Hefferon. x x x 1

Linear Algebra. Jim Hefferon. x x x 1 Linear Algebra Jim Hefferon ( 1 3) ( 2 1) 1 2 3 1 x 1 ( 1 3 ) ( 2 1) x 1 1 2 x 1 3 1 ( 6 8) ( 2 1) 6 2 8 1 Notation R real numbers N natural numbers: {, 1, 2,...} C complex numbers {......} set of... such

More information

Supplementary Figures

Supplementary Figures Supplementary Figures Supplementary Figure 1: Primary DEER data for the complexes of the RsmE protein dimer bound to two stem-loop RNAs singly spin-labelled at positions A to H (corresponding distance

More information

Introduction to Computational Neuroscience

Introduction to Computational Neuroscience CSE2330 Introduction to Computational Neuroscience Basic computational tools and concepts Tutorial 1 Duration: two weeks 1.1 About this tutorial The objective of this tutorial is to introduce you to: the

More information

Session 3. Question Answers

Session 3. Question Answers Session 3 Question Answers Question 1 Enter the example code and test the program. Try changing the step size 0.01 and see if you get a better results. The code for the example %Using Euler's method to

More information

ENED 1091 HW#3 Due Week of February 22 nd

ENED 1091 HW#3 Due Week of February 22 nd ENED 1091 HW#3 Due Week of February 22 nd Problem 1: The graph below shows position measurements (in cm) collected every 0.5 seconds over a 10 second interval of time. (a) Using linear interpolation, estimate

More information

last name ID 1 c/cmaker/cbreaker 2012 exam version a 6 pages 3 hours 40 marks no electronic devices SHOW ALL WORK

last name ID 1 c/cmaker/cbreaker 2012 exam version a 6 pages 3 hours 40 marks no electronic devices SHOW ALL WORK last name ID 1 c/cmaker/cbreaker 2012 exam version a 6 pages 3 hours 40 marks no electronic devices SHOW ALL WORK 8 a b c d e f g h i j k l m n o p q r s t u v w x y z 1 b c d e f g h i j k l m n o p q

More information

Matlab Section. November 8, 2005

Matlab Section. November 8, 2005 Matlab Section November 8, 2005 1 1 General commands Clear all variables from memory : clear all Close all figure windows : close all Save a variable in.mat format : save filename name of variable Load

More information

Epsilon-Delta Window Challenge Name Student Activity

Epsilon-Delta Window Challenge Name Student Activity Open the TI-Nspire document Epsilon-Delta.tns. In this activity, you will get to visualize what the formal definition of limit means in terms of a graphing window challenge. Informally, lim f( x) Lmeans

More information

Computer simulation of radioactive decay

Computer simulation of radioactive decay Computer simulation of radioactive decay y now you should have worked your way through the introduction to Maple, as well as the introduction to data analysis using Excel Now we will explore radioactive

More information

(f P Ω hf) vdx = 0 for all v V h, if and only if Ω (f P hf) φ i dx = 0, for i = 0, 1,..., n, where {φ i } V h is set of hat functions.

(f P Ω hf) vdx = 0 for all v V h, if and only if Ω (f P hf) φ i dx = 0, for i = 0, 1,..., n, where {φ i } V h is set of hat functions. Answer ALL FOUR Questions Question 1 Let I = [, 2] and f(x) = (x 1) 3 for x I. (a) Let V h be the continous space of linear piecewise function P 1 (I) on I. Write a MATLAB code to compute the L 2 -projection

More information

Y1 Double Maths Assignment λ (lambda) Exam Paper to do Core 1 Solomon C on the VLE. Drill

Y1 Double Maths Assignment λ (lambda) Exam Paper to do Core 1 Solomon C on the VLE. Drill α β γ δ ε ζ η θ ι κ λ µ ν ξ ο π ρ σ τ υ ϕ χ ψ ω Nature is an infinite sphere of which the centre is everywhere and the circumference nowhere Blaise Pascal Y Double Maths Assignment λ (lambda) Tracking

More information

Bayesian Analysis - A First Example

Bayesian Analysis - A First Example Bayesian Analysis - A First Example This script works through the example in Hoff (29), section 1.2.1 We are interested in a single parameter: θ, the fraction of individuals in a city population with with

More information

Bfh Ti Control F Ws 2008/2009 Lab Matlab-1

Bfh Ti Control F Ws 2008/2009 Lab Matlab-1 Bfh Ti Control F Ws 2008/2009 Lab Matlab-1 Theme: The very first steps with Matlab. Goals: After this laboratory you should be able to solve simple numerical engineering problems with Matlab. Furthermore,

More information

LAB # 5 HANDOUT. »»» The N-point DFT is converted into two DFTs each of N/2 points. N = -W N Then, the following formulas must be used. = k=0,...

LAB # 5 HANDOUT. »»» The N-point DFT is converted into two DFTs each of N/2 points. N = -W N Then, the following formulas must be used. = k=0,... EEE4 Lab Handout. FAST FOURIER TRANSFORM LAB # 5 HANDOUT Data Sequence A = x, x, x, x3, x4, x5, x6, x7»»» The N-point DFT is converted into two DFTs each of N/ points. x, x, x4, x6 x, x3, x5, x7»»» N =e

More information

Integration by Parts Logarithms and More Riemann Sums!

Integration by Parts Logarithms and More Riemann Sums! Integration by Parts Logarithms and More Riemann Sums! James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University September 16, 2013 Outline 1 IbyP with

More information

ISIS/Draw "Quick Start"

ISIS/Draw Quick Start ISIS/Draw "Quick Start" Click to print, or click Drawing Molecules * Basic Strategy 5.1 * Drawing Structures with Template tools and template pages 5.2 * Drawing bonds and chains 5.3 * Drawing atoms 5.4

More information

Quick-Guide to SATAID

Quick-Guide to SATAID Quick-Guide to SATAID Japan Meteorological Agency Updated as of 2017/07/24 What is SATAID? SATAID (SATellite Animation and Interactive Diagnosis) is a sophisticated display program that enables visualization

More information

2 Getting Started with Numerical Computations in Python

2 Getting Started with Numerical Computations in Python 1 Documentation and Resources * Download: o Requirements: Python, IPython, Numpy, Scipy, Matplotlib o Windows: google "windows download (Python,IPython,Numpy,Scipy,Matplotlib" o Debian based: sudo apt-get

More information

Customizing pgstar for your models

Customizing pgstar for your models MESA Summer School 10Aug2015 Customizing pgstar for your models Monique Windju / Frank Timmes/ Emily Leiner SI 2 SPIDER Color coded notation used throughout this lecture + lab: Things you do are in yellow,

More information

Quality Report Generated with Pix4Dmapper Pro version

Quality Report Generated with Pix4Dmapper Pro version Quality Report Generated with Pix4Dmapper Pro version 3.0.13 Important: Click on the different icons for: Help to analyze the results in the Quality Report Additional information about the sections Click

More information

Solutions. Chapter 1. Problem 1.1. Solution. Simulate free response of damped harmonic oscillator

Solutions. Chapter 1. Problem 1.1. Solution. Simulate free response of damped harmonic oscillator Chapter Solutions Problem. Simulate free response of damped harmonic oscillator ẍ + ζẋ + x = for different values of damping ration ζ and initial conditions. Plot the response x(t) and ẋ(t) versus t and

More information

Lecture 5b: Starting Matlab

Lecture 5b: Starting Matlab Lecture 5b: Starting Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University August 7, 2013 Outline 1 Resources 2 Starting Matlab 3 Homework

More information

www.goldensoftware.com Why Create a Thematic Map? A thematic map visually represents the geographic distribution of data. MapViewer will help you to: understand demographics define sales or insurance territories

More information

Matlab homework assignments for modeling dynamical systems

Matlab homework assignments for modeling dynamical systems Physics 311 Analytical Mechanics - Matlab Exercises C1.1 Matlab homework assignments for modeling dynamical systems Physics 311 - Analytical Mechanics Professor Bruce Thompson Department of Physics Ithaca

More information

Chapter 2 A Mathematical Toolbox

Chapter 2 A Mathematical Toolbox Chapter 2 Mathematical Toolbox Vectors and Scalars 1) Scalars have only a magnitude (numerical value) Denoted by a symbol, a 2) Vectors have a magnitude and direction Denoted by a bold symbol (), or symbol

More information

Experiment: Oscillations of a Mass on a Spring

Experiment: Oscillations of a Mass on a Spring Physics NYC F17 Objective: Theory: Experiment: Oscillations of a Mass on a Spring A: to verify Hooke s law for a spring and measure its elasticity constant. B: to check the relationship between the period

More information

MATLAB crash course 1 / 27. MATLAB crash course. Cesar E. Tamayo Economics - Rutgers. September 27th, /27

MATLAB crash course 1 / 27. MATLAB crash course. Cesar E. Tamayo Economics - Rutgers. September 27th, /27 1/27 MATLAB crash course 1 / 27 MATLAB crash course Cesar E. Tamayo Economics - Rutgers September 27th, 2013 2/27 MATLAB crash course 2 / 27 Program Program I Interface: layout, menus, help, etc.. I Vectors

More information

PHYS 114 Exam 1 Answer Key NAME:

PHYS 114 Exam 1 Answer Key NAME: PHYS 4 Exam Answer Key AME: Please answer all of the questions below. Each part of each question is worth points, except question 5, which is worth 0 points.. Explain what the following MatLAB commands

More information

Electric Fields and Equipotentials

Electric Fields and Equipotentials OBJECTIVE Electric Fields and Equipotentials To study and describe the two-dimensional electric field. To map the location of the equipotential surfaces around charged electrodes. To study the relationship

More information