National Workshop on LaTeX and MATLAB for Beginners
|
|
- Blake Newton
- 5 years ago
- Views:
Transcription
1 BITS Pilani Pilani Campus National Workshop on LaTeX and MATLAB for Beginners December, 2014 Partially Supported By: DST-Rajasthan
2 BITS Pilani Pilani Campus Lecture-9 (Dr. Trilok Mathur) Creation of M-files & Graphics in MATLAB
3 Solving a system of linear equation using rref(a) Obtaining eigenvalue and eigenvector of a Matrix LU Factorization Roots of a polynomial 3
4 4 Consider following system of linear equations: t z x t y x z y x which is equivalent to following matrix equation: b AX where A b t z y x X and
5 Enter coefficient matrix A = [ ; ; ], and b = [16;16;5] Now define augmented matrix C = [A,b] and obtain Row reduced echelon form (rref) of C: rref (C) Thus the solutions are: {(x, y, z, t) = (25-6k, 9k+34, k, 9): k is any real number} 5
6 Enter a matrix A = [2 1 0;-3, 8, 4;4, 2, -9] >> eig (A) >> [V, D] = eig (A) Here V is the matrix containing the eigenvectors of A as its columns. D is a matrix that contains the eigenvalue of A on its diagonal LU decomposition of a matrix >> [L, U] = lu (A) Here L is a lower triangular matrix and U is a upper triangular matrix such that L*U = A 6
7 Let f ( x) 3x 4 4x 3 2x 2 17x 10 In MATLAB a polynomial of degree n is a row vector of dimension (n+1) 1. Enter a vector: >> f = [ ] >> roots( f ) This command will return all the 4 roots of f as a column vector. 7
8 Operator Symbol Description AND & Returns 1 for every element location that is true (non zero) for both array, otherwise 0 OR Returns 1 for every element location that is true (nonzero), at least for one array, otherwise 0 NOT ~ Complement each element of the array XOR xor Returns 1 for every element location that is true (nonzero) in only one array, otherwise 0 8
9 Note: MATLAB consider any non-zero numeric value as 1 and use it as input for logical expressions 9
10 M-File Creation MATLAB if MATLAB for Plotting A Graph 10
11 11
12 12
13 13
14 14
15 15
16 If you want that your M-File after execution, show the result on command window, use X = disp (variable_name) command. It will show the value stored in variable X in M-File on the command window. If you want to display a message in command window use disp ( This is a message ) 16
17 17
18 If you want to take input from user in your program, use X = input ( Please enter the value- ) This will show the message Please enter the value- in command window After getting input from user it will be stored in X, that you can use in your program later at any point. 18
19 19
20 if Execute statements if condition is true Syntax if expression Statements; end Description if expression, statements, end evaluates expression and, if the evaluation yields logical 1 (true) or a nonzero result, executes one or more MATLAB commands denoted here as statements. 20
21 expression is a MATLAB expression, usually consisting of variables or smaller expressions joined by relational operators (e.g., count < limit), or logical functions (e.g., isreal(a)). Simple expressions can be combined by logical operators (&&,, ~) into compound expressions. MATLAB evaluates compound expressions for if from left to right, adhering to operator precedence rules. Nested if statements must each be paired with a matching 21 end.
22 The if function can be used alone or with the else and elseif functions. When using elseif and/or else within an if statement, the general form of the statement is: if expression1 statements1 ; elseif expression2 statements2; else statements3; end 22
23 Try disp ('This is a program for Subtraction of two matrices- ') a = input ('Please enter first Matrix - ') b = input ('Please enter Second Matrix b - ') if (size (a) ==size (b)); x = a - b; disp ('The Subtraction of two matrices is- '); disp (x); else disp ('ERROR- MATRIX DIMENSIONS MUST MATCH') end 23
24 Notice!! 24
25 for Execute block of code specified number of times Syntax for x=initval : endval,/initval : stepval : endval, statements, end Description for repeatedly executes one or more MATLAB statements in a loop. 25
26 Loop counter variable x is initialized to value initval at the start of the first pass through the loop, and automatically increments by 1 each time through the loop. The program makes repeated passes through statements until either x has incremented to the value endval, or MATLAB encounters a break, or return instruction, thus forcing an immediately exit of the loop. 26
27 The scope of the for statement is always terminated with a matching end The values initval and endval must be real numbers or arrays of real numbers, or can also be calls to functions that return the same. For loop can be used in nested form (that is one for loop inside the scope of other). For loop can be used in combination of other loops also. 27
28 Lets Try disp ('This is a program for summation of n natural numbers starting from zero') n = input ('Please enter the value of n - '); X = 0; for i = 1 : n end X = X+i; disp ('The summation is') disp (X) 28
29 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 29
30 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 30
31 1 Cosine 1 Sine 1 cos(n/4) n 31
32 32
33 33
34 Ticks on Y- Axis Box Title Legend Y-Axis Label on Y- Axis Data Points/ Marker Curve/Line X-Axis Label on X- Axis Ticks on X- Axis 34
35 Note: You can edit each of the component of the graph except DATA POINTS. You can edit graphs manually, as well as automatically in m-file while plotting it. You can edit graphs at later point of time using.fig file, opened in editor. 35
36 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 36
37 Before starting with the graph plots; some functions which are defined with MATLAB are listed hereafter (in alphabetical order). Use of these functions are also defined. Go to help and read the syntax type of a particular function you intend to use. The classification of these function is: 37
38 Trigonometric Exponential Classification Use Trigonometric functions with results in radians or degrees Exponential, logarithm, power, and root functions Complex Rounding and Remainder Numbers with real and imaginary components, phase angles Rounding, modulus, and remainder Discrete Math Prime factors, factorials, permutations, rational fractions, least common multiple, greatest common divisor 38
39 Trigonometric acos Inverse cosine; result in radians acosd Inverse cosine; result in degrees acosh Inverse hyperbolic cosine acot Inverse cotangent; result in radians acotd Inverse cotangent; result in degrees acoth Inverse hyperbolic cotangent acsc Inverse cosecant; result in radians acscd Inverse cosecant; result in degrees acsch Inverse hyperbolic cosecant asec Inverse secant; result in radians 39
40 asecd Inverse secant; result in degrees asech Inverse hyperbolic secant asin Inverse sine; result in radians asind Inverse sine; result in degrees asinh Inverse hyperbolic sine atan Inverse tangent; result in radians atan2 Four-quadrant inverse tangent atand Inverse tangent; result in degrees atanh Inverse hyperbolic tangent cos Cosine of argument in radians cosd Cosine of argument in degrees cosh Hyperbolic cosine cot Cotangent of argument in radians 40
41 cotd Cotangent of argument in degrees coth Hyperbolic cotangent csc Cosecant of argument in radians cscd Cosecant of argument in degrees csch Hyperbolic cosecant hypot Square root of sum of squares sec Secant of argument in radians secd Secant of argument in degrees sech Hyperbolic secant sin Sine of argument in radians sind Sine of argument in degrees sinh Hyperbolic sine of argument in radians tan Tangent of argument in radians tand Tangent of argument in degrees tanh Hyperbolic tangent 41
42 Exponential exp Exponential log Natural logarithm log10 Common (base 10) logarithm log2 Base 2 logarithm and dissect floating-point numbers into exponent and mantissa nextpow2 Next higher power of 2 nthroot Real nth root of real numbers pow2 Base 2 power and scale floating-point numbers reallog Natural logarithm for nonnegative real arrays realpow Array power for real-only output realsqrt Square root for nonnegative real arrays sqrt Square root 42
43 Complex abs Absolute value and complex magnitude angle Phase angle complex Construct complex data from real and imaginary components conj Complex conjugate cplxpair Sort complex numbers into complex conjugate pairs i Imaginary unit imag Imaginary part of complex number isreal Check if input is real arrayjimaginary unit real Real part of complex number sign Signum function unwrap Correct phase angles to produce smoother phase plots 43
44 Rounding and Remainder ceil Round toward positive infinity fix Round toward zero floor Round toward negative infinity idivide Integer division with rounding option mod Modulus after division rem Remainder after division round Round to nearest integer 44
45 Discrete Math factor Prime factors factorial Factorial function gcd Greatest common divisor isprime Array elements that are prime numbers lcm Least common multiple nchoosek Binomial coefficient or all combinations perms All possible permutations primes Generate list of prime numbers rat, rats Rational fraction approximation 45
46 Polynomials conv Convolution and polynomial multiplication deconv De-convolution and polynomial division poly Polynomial with specified roots polyder Polynomial derivative polyeig Polynomial eigenvalue problem polyfit Polynomial curve fitting polyint Integrate polynomial analytically polyval Polynomial evaluation polyvalm Matrix polynomial evaluation roots Polynomial roots 46
47 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 47
48 The simplest way of plotting a 2D graph in MATLAB is via using function: Plot (A) Plot (A, B) Description: plot(a) plots the columns of A versus their index. plot(a, B) plots the columns of A versus the columns of B. 48
49 x=0:0.1:10; A = cos (x) plot(x, A) 49
50 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 50
51 Y = [ ] plot (Y) Y = [ ] X = [ ] plot (X, Y) 51
52 Changing the color of the graph: R = [ ] S = [ ] plot (R, S, 'k') R = [ ] S = [ ] plot (R, S, 'b') 52
53 The various color codes are available with MATLAB, which are listed in HELP Few of them are Cyan - c Red - r Magenta - m Yellow- y 53
54 Plotting Data Points Only: R = [ ] S = [ ] plot (R, S, '*b') The other symbols are + for plus symbol O for Circle > for Triangle < for Triangle s for square d for Dimond p for pantagon 54
55 Plotting Data Points with Line : R = [ ] S = [ ] plot (R, S, '-square') 55
56 Defining Line Width: R = [ ] S = [ ] plot (R, S, '-m', 'LineWidth', 12) 56
57 Defining Marker Size: R = [ ] S = [ ] plot (R, S, '->m', 'MarkerSize', 12) 57
58 Defining Marker Color: R = [ ] S = [ ] plot (R, S, '->m', 'MarkerFaceColor', 'b') 58
59 Defining Multiple Properties: R = [ ] S = [ ] plot (R, S, ' <b','linewidth',3,'markerfacecolor','m', 'MarkerSize', 24); 59
60 Defining Axes in Graph: axis([xmin xmax ymin ymax]) x = -pi:.1:pi; y = sin(x); plot (x,y) x = -pi:.1:pi; y = sin(x); plot(x,y) axis([ ]); 60
61 Defining Ticks on X- Axis and Y-Axis in Graph: y = sin(x); plot(x,y) set(gca,'xtick',-pi:pi/2:pi) gca: command to handle current axis set(h, Propertyname, propertyvalue, ) 61
62 Defining Ticks Label on X- Axis and Y-Axis in Graph: x = -pi:.1:pi; y = sin(x); plot(x,y) set(gca,'xtick',-pi:pi/2:pi) set(gca,'xticklabel',{'-pi','- pi/2','0','pi/2','pi'}) 62
63 Defining Ticks Label on X- Axis and Y-Axis in Graph: x = -pi:.1:pi; y = sin(x); plot(x,y) set(gca,'xtick',-pi:pi/2:pi) set(gca,'xticklabel',{'-pi','- pi/2','0','pi/2','pi'}) xlabel('-\pi \leq \Theta \leq \pi') ylabel('sin(\theta) ) 63
64 Defining Title and Text in Graph: x = -pi:.1:pi; y = sin(x); plot(x,y) set(gca,'xtick',-pi:pi/2:pi) set(gca,'xticklabel',{'-pi','- pi/2','0','pi/2','pi'}) xlabel('-\pi \leq \Theta \leq \pi') ylabel('sin(\theta)') title('plot of sin(\theta) ) 64
65 Defining Legend in Graph: X = [ ]; Y1 = [ ]; plot(x,y1,'-sb','markeredgecolor','k'); axis([ ]); set(gca,'xtick',[ ]); set(gca,'xticklabel',{'0' '200' '400' '600' '800' '1000' '1200' '1400'}); set(gca,'ytick',[ ]); set(gca,'yticklabel',{'500', '1000','1500','2000','2500','3000'}); xlabel('total Number of Request Made for Connection Establishment/Time '); ylabel('success Rate for Connection Establishment (SCER)'); legend('v-tft'); Title('Comparison'); 65
66 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 8. Sub-graph 9. Demo: On Graph Generation 66
67 Bar Graph: bar(y) bar(x,y) bar(...,width) bar(...,'style') bar(...,'bar_color') bar(...,'propertyname',propertyvalue,...) 67
68 A bar graph displays the values in a vector or matrix as horizontal or vertical bars. bar(y) draws one bar for each element in Y. If Y is a matrix, bar groups the bars produced by the elements in each row. The x-axis scale ranges from 1 up to length(y) when Y is a vector, and 1 to size(y,1), which is the number of rows, when Y is a matrix. The default is to scale the x-axis to the highest x-tick on the plot, (a multiple of 10, 100, etc.). 68
69 Y =magic(4)*10; bar(y) 69
70 X=[1:10]; Y=rand(10,1); bar(x,y,'r'); xlabel('x','fontsize',18); Note: Editing of bar is similar to that of plot 70
71 71
72 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 72
73 Pie Chart pie(x) pie(x,explode) pie(...,labels) Description pie(x) draws a pie chart using the data in X. Each element in X is represented as a slice in the pie chart. pie(x,explode) offsets a slice from the pie. Explode is a vector or matrix of zeros and nonzeros that correspond to X. Explode must be the same size as X. pie(...,labels) specifies text labels for the slices. The number of labels must equal the number of elements in X. 73
74 Try: x = [ ] pie(x) 74
75 Try: x = [ ] explode = [ ]; pie(x,explode) 75
76 Try: pie(1:3,{'taxes','expenses','profit'}) 76
77 Try: x = [ ]; pie(x) 77
78 Try: X = [ ]; Explode = [ ]; Pie(X, Explode) 78
79 1. Introduction to Graph Components 2. Some Pre-Defined MATLAB Functions 3. Plotting 2D Graphs 4. Editing Graphs 5. Bar Graphs 6. Pie Charts 7. Multiple Graphs 79
80 Suppose you need to analyze more than one variable in a single graph That is, you need different curves/plots in a single run of your program on one plot for such case you can use following syntax: hold on; plot (X,Y) hold off; 80
81 Try: X = [ ] Y = [ ] Z = [ ] hold on; plot (X, Y, '-or') plot (Y,Z, '-*c') hold off; 81
82 Try: X = [ ] Y = [ ] Z = [ ] figure; hold on; plot (X,Y, '-or') plot (Y,Z, '-*c') hold off; figure; plot (X,Z, '-sm') 82
83 To save figure in current directory: saveas ( filename ) % by default as fig file saveas ( filename.jpg ) saveas ( filename.tif ) saveas is also used for other type of files, such as.pdf. 83
84
Script started on Thu 25 Aug :00:40 PM CDT
Script started on Thu 25 Aug 2016 02:00:40 PM CDT < M A T L A B (R) > Copyright 1984-2014 The MathWorks, Inc. R2014a (8.3.0.532) 64-bit (glnxa64) February 11, 2014 To get started, type one of these: helpwin,
More informationLAB 1 General MATLAB Information 1
LAB 1 General MATLAB Information 1 General: To enter a matrix: > type the entries between square brackets, [...] > enter it by rows with elements separated by a space or comma > rows are terminated by
More informationA. Matrix-wise and element-wise operations
USC GSBME MATLAB CLASS Reviewing previous session Second session A. Matrix-wise and element-wise operations A.1. Matrix-wise operations So far we learned how to define variables and how to extract data
More informationIntroduction to Scientific and Engineering Computing, BIL108E. Karaman
USING MATLAB INTRODUCTION TO SCIENTIFIC & ENGINEERING COMPUTING BIL 108E, CRN24023 To start from Windows, Double click the Matlab icon. To start from UNIX, Dr. S. Gökhan type matlab at the shell prompt.
More informationProgramming in MATLAB
trevor.spiteri@um.edu.mt http://staff.um.edu.mt/trevor.spiteri Department of Communications and Computer Engineering Faculty of Information and Communication Technology University of Malta 17 February,
More informationGeneral MATLAB Information 1
Introduction to MATLAB General MATLAB Information 1 Once you initiate the MATLAB software, you will see the MATLAB logo appear and then the MATLAB prompt >>. The prompt >> indicates that MATLAB is awaiting
More informationMatlab Workshop I. Niloufer Mackey and Lixin Shen
Matlab Workshop I Niloufer Mackey and Lixin Shen Western Michigan University/ Syracuse University Email: nil.mackey@wmich.edu, lshen03@syr.edu@wmich.edu p.1/13 What is Matlab? Matlab is a commercial Matrix
More informationIntroduction to MATLAB
Outlines September 9, 2004 Outlines Part I: Review of Previous Lecture Part II: Part III: Writing MATLAB Functions Review of Previous Lecture Outlines Part I: Review of Previous Lecture Part II: Part III:
More informationMATLAB Workshop Dr. M. T. Mustafa Department of Mathematical Sciences. Introductory remarks
MATLAB Workshop Dr. M. T. Mustafa Department of Mathematical Sciences Introductory remarks MATLAB: a product of mathworks www.mathworks.com MATrix LABoratory What can we do (in or ) with MATLAB o Use like
More informationStarting MATLAB To logon onto a Temple workstation at the Tech Center, follow the directions below.
What is MATLAB? MATLAB (short for MATrix LABoratory) is a language for technical computing, developed by The Mathworks, Inc. (A matrix is a rectangular array or table of usually numerical values.) MATLAB
More informationGRAPH 4.4. Megha K. Raman APRIL 22, 2015
GRAPH 4.4 By Megha K. Raman APRIL 22, 2015 1. Preface... 4 2. Introduction:... 4 3. Plotting a function... 5 Sample funtions:... 9 List of Functions:... 10 Constants:... 10 Operators:... 11 Functions:...
More informationBRUNO WELFERT Arizona State University AND. R. Kent Nagle. University of South Florida. Edward B. Saff. Vanderbilt University. A.
ONLINE MATLAB MANUAL BRUNO WELFERT Arizona State University FUNDAMENTALS OF DIFFERENTIAL EQUATIONS SEVENTH EDITION AND FUNDAMENTALS OF DIFFERENTIAL EQUATIONS AND BOUNDARY VALUE PROBLEMS FIFTH EDITION R.
More informationIntroduction to MATLAB
Outlines January 30, 2008 Outlines Part I: Part II: Writing MATLAB Functions Starting MATLAB Exiting MATLAB Getting Help Command Window Workspace Command History Current Directory Selector Real Values
More informationEbooks Chemical Engineering
Uploaded by: Ebooks Chemical Engineering https://www.facebook.com/pages/ebooks-chemical-engineering/238197077030 For More Books, softwares & tutorials Related to Chemical Engineering Join Us @facebook:
More informationArithmetic and Logic Blocks
Arithmetic and Logic Blocks The Addition Block The block performs addition and subtractions on its inputs. This block can add or subtract scalar, vector, or matrix inputs. We can specify the operation
More informationChapter 1 MATLAB Preliminaries
Chapter 1 MATLAB Preliminaries 1.1 INTRODUCTION MATLAB (Matrix Laboratory) is a high-level technical computing environment developed by The Mathworks, Inc. for mathematical, scientific, and engineering
More informationLecturer: Keyvan Dehmamy
MATLAB Tutorial Lecturer: Keyvan Dehmamy 1 Topics Introduction Running MATLAB and MATLAB Environment Getting help Variables Vectors, Matrices, and linear Algebra Mathematical Functions and Applications
More informationMATLAB Tutorial. Digital Signal Processing. Course Details. Topics. MATLAB Environment. Introduction. Digital Signal Processing (DSP)
Digital Signal Processing Prof. Nizamettin AYDIN naydin@yildiz.edu.tr naydin@ieee.org http://www.yildiz.edu.tr/~naydin Course Details Course Code : 0113620 Course Name: Digital Signal Processing (Sayısal
More informationIntroduction to MATLAB
Introduction to MATLAB Brett Ninness Department of Electrical and Computer Engineering The University of Newcastle, Australia. The name MATLAB is a sort of acronym for Matrix Laboratory. In fact, MATLAB
More informationA General Introduction to Matlab
Master Degree Course in ELECTRONICS ENGINEERING http://www.dii.unimore.it/~lbiagiotti/systemscontroltheory.html A General Introduction to Matlab e-mail: luigi.biagiotti@unimore.it http://www.dii.unimore.it/~lbiagiotti
More informationIntroduction 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 informationMATLAB: a Brief Introduction. by Robert L. Rankin
MATLAB: a Brief Introduction by Robert L. Rankin Spring 1996 R.1 Introduction to MATLAB MATLAB: a Brief Introduction MATLAB is an acronym for MATrix LABoratory and is a highly optimized numerical computation
More informationIntroduction to Matlab
Introduction to Matlab Eugeniy E. Mikhailov The College of William & Mary Lecture 02 Eugeniy Mikhailov (W&M) Practical Computing Lecture 02 1 / 27 Matlab variable types Eugeniy Mikhailov (W&M) Practical
More informationA very brief Matlab introduction
A very brief Matlab introduction Siniša Krajnović January 24, 2006 This is a very brief introduction to Matlab and its purpose is only to introduce students of the CFD course into Matlab. After reading
More informationFundamentals of MATLAB Usage
수치해석기초 Fundamentals of MATLAB Usage 2008. 9 담당교수 : 주한규 joohan@snu.ac.kr, x9241, Rm 32-205 205 원자핵공학과 1 MATLAB Features MATLAB: Matrix Laboratory Process everything based on Matrix (array of numbers) Math
More informationLecture 1: What is MATLAB?
Lecture 1: What is MATLAB? Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 1. MATLAB MATLAB (MATrix LABoratory) is a numerical
More informationScientific Computing Lecture 1: MATLAB fundamentals
Scientific Computing Lecture 1: MATLAB fundamentals InFoMM CDT Mathematical Institute University of Oxford Andrew Thompson (slides by Stuart Murray) Lecture I: MATLAB fundamentals What is MATLAB? MATLAB
More informationIntroduction to MATLAB for CSE390
Introduction Introduction to MATLAB for CSE390 Professor Vijay Kumar Praveen Srinivasan University of Pennsylvania MATLAB is an interactive program designed for scientific computations, visualization and
More informationIntroduction to Matlab. Matlab variable types. Matlab variable types. Matlab variable types. Notes. Eugeniy E. Mikhailov. Lecture 02. Notes.
Introduction to Matlab Eugeniy E. Mikhailov The College of William & Mary Lecture 02 Eugeniy Mikhailov (W&M) Practical Computing Lecture 02 1 / 26 Matlab variable types Eugeniy Mikhailov (W&M) Practical
More informationMATLAB Constants, Variables & Expression. 9/12/2015 By: Nafees Ahmed
MATLAB Constants, Variables & Expression Introduction MATLAB can be used as a powerful programming language. It do have IF, WHILE, FOR lops similar to other programming languages. It has its own vocabulary
More informationHonors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1
Solving equations and inequalities graphically and algebraically 1. Plot points on the Cartesian coordinate plane. P.1 2. Represent data graphically using scatter plots, bar graphs, & line graphs. P.1
More informationInlichtingenblad, matlab- en simulink handleiding en practicumopgaven IWS
Inlichtingenblad, matlab- en simulink handleiding en practicumopgaven IWS 1 6 3 Matlab 3.1 Fundamentals Matlab. The name Matlab stands for matrix laboratory. Main principle. Matlab works with rectangular
More informationThis is a basic tutorial for the MATLAB program which is a high-performance language for technical computing for platforms:
Appendix A Basic MATLAB Tutorial Extracted from: http://www1.gantep.edu.tr/ bingul/ep375 http://www.mathworks.com/products/matlab A.1 Introduction This is a basic tutorial for the MATLAB program which
More informationMATH 3511 Basics of MATLAB
MATH 3511 Basics of MATLAB Dmitriy Leykekhman Spring 2012 Topics Sources. Entering Matrices. Basic Operations with Matrices. Build in Matrices. Build in Scalar and Matrix Functions. if, while, for m-files
More informationMATH 5520 Basics of MATLAB
MATH 5520 Basics of MATLAB Dmitriy Leykekhman Spring 2011 Topics Sources. Entering Matrices. Basic Operations with Matrices. Build in Matrices. Build in Scalar and Matrix Functions. if, while, for m-files
More informationSome elements for Matlab programming
Some elements for Matlab programming Nathalie Thomas 2018 2019 Matlab, which stands for the abbreviation of MATrix LABoratory, is one of the most popular language for scientic computation. The classical
More informationThe Graphing Calculator
Chapter 23 The Graphing Calculator To display the calculator, select Graphing Calculator from the Window menu. The calculator is displayed in front of the other windows. Resize or re-position the Graphing
More informationGUI 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 informationMastery. PRECALCULUS Student Learning Targets
PRECALCULUS Student Learning Targets Big Idea: Sequences and Series 1. I can describe a sequence as a function where the domain is the set of natural numbers. Connections (Pictures, Vocabulary, Definitions,
More information# Import constants pi2, pip2, pip4 (2*pi, pi/2, pi/4). use Math::Trig ':pi';
NAME Math::Trig - trigonometric functions SYNOPSIS use Math::Trig; $x = tan(0.9); $y = acos(3.7); $z = asin(2.4); $halfpi = pi/2; $rad = deg2rad(120); # Import constants pi2, pip2, pip4 (2*pi, pi/2, pi/4).
More informationDr Richard Greenaway
SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 2 Basic MATLAB Operation Dr Richard Greenaway 2 Basic MATLAB Operation 2.1 Overview 2.1.1 The Command Line In this Workshop you will learn how
More informationA very short introduction to Matlab and Octave
A very short introduction to Matlab and Octave Claude Fuhrer (claude.fuhrer@bfh.ch) 09 November 2016 Contents 1 Installation 3 2 Variables and literal values 3 2.1 Variables....................................
More informationA Guide to Using Some Basic MATLAB Functions
A Guide to Using Some Basic MATLAB Functions UNC Charlotte Robert W. Cox This document provides a brief overview of some of the essential MATLAB functionality. More thorough descriptions are available
More informationPIV Programming. Today s Contents: 1. Matlab Programming 2. An example of PIV in Matlab code 3. EDPIV 4. PIV plugin for ImageJ 5.
PIV Programming Last Class: 1. Introduction of μpiv 2. Considerations of Microscopy in μpiv 3. Depth of Correlation 4. Physics of Particles in Micro PIV 5. Measurement Errors 6. Special Processing Methods
More informationExperiment 1: Introduction to MATLAB I. Introduction. 1.1 Objectives and Expectations: 1.2 What is MATLAB?
Experiment 1: Introduction to MATLAB I Introduction MATLAB, which stands for Matrix Laboratory, is a very powerful program for performing numerical and symbolic calculations, and is widely used in science
More informationshort-reference.mht 1/ /WK/
short-reference.mht 1/6 6KRUW0$7/$%5HIHUHQFH There are many MATLAB features which cannot be included in these introductory notes. Listed below are some of the MATLAB functions and operators available,
More informationMath 144 Activity #3 Coterminal Angles and Reference Angles
144 p 1 Math 144 Activity #3 Coterminal Angles and Reference Angles For this activity we will be referring to the unit circle. Using the unit circle below, explain how you can find the sine of any given
More informationINTRODUCTION TO MATLAB. Padmanabhan Seshaiyer
INTRODUCTION TO MATLAB First Steps You should start MATLAB by simply typing matlab if you are working on a Unix system or just by double clicking the MATLAB icon if you are using a Windows based system.
More informationLogical 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 information12 whereas if I terminate the expression with a semicolon, the printed output is suppressed.
Example 4 Printing and Plotting Matlab provides numerous print and plot options. This example illustrates the basics and provides enough detail that you can use it for typical classroom work and assignments.
More informationMATLAB and Numerical Analysis
School of Mechanical Engineering Pusan National University dongwoonkim@pusan.ac.kr Teaching Assistant 김동운 dongwoonkim@pusan.ac.kr 윤종희 jongheeyun@pusan.ac.kr Lab office: 통합기계관 120호 ( 510-3921) 방사선영상연구실홈페이지
More informationThe Official Guide to Easy Graphing. ParaGraph. Ver Congratulations Graphing just got easier.
The Official Guide to Easy Graphing ParaGraph Ver. 6.5.1 Congratulations Graphing just got easier. Here s to putting a parametric grapher in your hands. Vande Burgt Productions Visual Basic Gadgets 3/3/2012
More informationIntroduction to Matlab
Introduction to Matlab By:Mohammad Sadeghi *Dr. Sajid Gul Khawaja Slides has been used partially to prepare this presentation Outline: What is Matlab? Matlab Screen Basic functions Variables, matrix, indexing
More informationWelcome. Please Sign-In
Welcome Please Sign-In Day 1 Session 1 Self-Evaluation Topics to be covered: Equations Systems of Equations Solving Inequalities Absolute Value Equations Equations Equations An equation says two things
More informationIntroduction 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 informationConsider this m file that creates a file that you can load data into called rain.txt
SAVING AND IMPORTING DATA FROM A DATA FILES AND PROCESSING AS A ONE DIMENSIONAL ARRAY If we save data in a file sequentially than we can call it back sequentially into a row vector. Consider this m file
More informationMacro Programming Reference Guide. Copyright 2005 Scott Martinez
Macro Programming Reference Guide Copyright 2005 Scott Martinez Section 1. Section 2. Section 3. Section 4. Section 5. Section 6. Section 7. What is macro programming What are Variables What are Expressions
More information5-2 Verifying Trigonometric Identities
Verify each identity 1 (sec 1) cos = sin sec (1 cos ) = tan 3 sin sin cos 3 = sin 4 csc cos cot = sin 4 5 = cot Page 1 4 5 = cot 6 tan θ csc tan = cot 7 = cot 8 + = csc Page 8 = csc + 9 + tan = sec 10
More informationMATLAB Tutorial EE351M DSP. Created: Thursday Jan 25, 2007 Rayyan Jaber. Modified by: Kitaek Bae. Outline
MATLAB Tutorial EE351M DSP Created: Thursday Jan 25, 2007 Rayyan Jaber Modified by: Kitaek Bae Outline Part I: Introduction and Overview Part II: Matrix manipulations and common functions Part III: Plots
More informationDEPARTMENT - Mathematics. Coding: N Number. A Algebra. G&M Geometry and Measure. S Statistics. P - Probability. R&P Ratio and Proportion
DEPARTMENT - Mathematics Coding: N Number A Algebra G&M Geometry and Measure S Statistics P - Probability R&P Ratio and Proportion YEAR 7 YEAR 8 N1 Integers A 1 Simplifying G&M1 2D Shapes N2 Decimals S1
More informationDr Richard Greenaway
SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 3 Creating, Organising & Processing Data Dr Richard Greenaway 3 Creating, Organising & Processing Data In this Workshop the matrix type is introduced
More informationA QUICK INTRODUCTION TO MATLAB
A QUICK INTRODUCTION TO MATLAB Very brief intro to matlab Basic operations and a few illustrations This set is independent from rest of the class notes. Matlab will be covered in recitations and occasionally
More informationSection 5.3 Graphs of the Cosecant and Secant Functions 1
Section 5.3 Graphs of the Cosecant, Secant, Tangent, and Cotangent Functions The Cosecant Graph RECALL: 1 csc x so where sin x 0, csc x has an asymptote. sin x To graph y Acsc( Bx C) D, first graph THE
More informationMATLAB Lesson I. Chiara Lelli. October 2, Politecnico di Milano
MATLAB Lesson I Chiara Lelli Politecnico di Milano October 2, 2012 MATLAB MATLAB (MATrix LABoratory) is an interactive software system for: scientific computing statistical analysis vector and matrix computations
More informationA QUICK INTRODUCTION TO MATLAB. Intro to matlab getting started
A QUICK INTRODUCTION TO MATLAB Very brief intro to matlab Intro to matlab getting started Basic operations and a few illustrations This set is indepent from rest of the class notes. Matlab will be covered
More informationSingle row numeric functions
Single row numeric functions Oracle provides a lot of standard numeric functions for single rows. Here is a list of all the single row numeric functions (in version 10.2). Function Description ABS(n) ABS
More informationChapter 1 Introduction to MATLAB
Chapter 1 Introduction to MATLAB 1.1 What is MATLAB? MATLAB = MATrix LABoratory, the language of technical computing, modeling and simulation, data analysis and processing, visualization and graphics,
More information5-2 Verifying Trigonometric Identities
5- Verifying Trigonometric Identities Verify each identity. 1. (sec 1) cos = sin 3. sin sin 3 = sin cos 4 5. = cot 7. = cot 9. + tan = sec Page 1 5- Verifying Trigonometric Identities 7. = cot 9. + tan
More informationTrigonometric Functions of Any Angle
Trigonometric Functions of Any Angle MATH 160, Precalculus J. Robert Buchanan Department of Mathematics Fall 2011 Objectives In this lesson we will learn to: evaluate trigonometric functions of any angle,
More informationIntroduction to MATLAB
Introduction to MATLAB (MATrix LABoratory) Presented By: Dr Mostafa Elshahed Asst. Prof. 1 Upon completing this course, the student should be able to: Learn a brief introduction to programming in MATLAB.
More informationIntroduction to MATLAB
Introduction to MATLAB Basics MATLAB is a high-level interpreted language, and uses a read-evaluate-print loop: it reads your command, evaluates it, then prints the answer. This means it works a lot like
More informationAMS 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 informationStokes 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 informationFinding, Starting and Using Matlab
Variables and Arrays Finding, Starting and Using Matlab CSC March 6 &, 9 Array: A collection of data values organized into rows and columns, and known by a single name. arr(,) Row Row Row Row 4 Col Col
More informationSNAP Centre Workshop. Introduction to Trigonometry
SNAP Centre Workshop Introduction to Trigonometry 62 Right Triangle Review A right triangle is any triangle that contains a 90 degree angle. There are six pieces of information we can know about a given
More informationIntroduction to Matlab
Technische Universität München WT 21/11 Institut für Informatik Prof Dr H-J Bungartz Dipl-Tech Math S Schraufstetter Benjamin Peherstorfer, MSc October 22nd, 21 Introduction to Matlab Engineering Informatics
More informationMath 1330 Final Exam Review Covers all material covered in class this semester.
Math 1330 Final Exam Review Covers all material covered in class this semester. 1. Give an equation that could represent each graph. A. Recall: For other types of polynomials: End Behavior An even-degree
More informationChapter 2 (Part 2) MATLAB Basics. dr.dcd.h CS 101 /SJC 5th Edition 1
Chapter 2 (Part 2) MATLAB Basics dr.dcd.h CS 101 /SJC 5th Edition 1 Display Format In the command window, integers are always displayed as integers Characters are always displayed as strings Other values
More informationBuilt-in Types of Data
Built-in Types of Data Types A data type is set of values and a set of operations defined on those values Python supports several built-in data types: int (for integers), float (for floating-point numbers),
More informationUnit Circle. Project Response Sheet
NAME: PROJECT ACTIVITY: Trigonometry TOPIC Unit Circle GOALS MATERIALS Explore Degree and Radian Measure Explore x- and y- coordinates on the Unit Circle Investigate Odd and Even functions Investigate
More informationCreates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window.
EE 350L: Signals and Transforms Lab Spring 2007 Lab #1 - Introduction to MATLAB Lab Handout Matlab Software: Matlab will be the analytical tool used in the signals lab. The laboratory has network licenses
More informationPART 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 informationUNIVERSITI 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 informationUsing GNU Octave for Numerical Methods
Using GNU Octave for Numerical Methods by Dennis Pence September 2015 Contents 1 What are the alternatives to Matlab? 1 1.1 What is GNU Octave?...................... 1 1.2 What is Scilab?..........................
More informationGraphics in MATLAB. Responsible teacher: Anatoliy Malyarenko. November 10, Abstract. Basic Plotting Commands
Graphics in MATLAB Responsible teacher: Anatoliy Malyarenko November 10, 2003 Contents of the lecture: Two-dimensional graphics. Formatting graphs. Three-dimensional graphics. Specialised plots. Abstract
More information# Import constants pi2, pip2, pip4 (2*pi, pi/2, pi/4). use Math::Trig ':pi';
NAME Math::Trig - trigonometric functions SYNOPSIS use Math::Trig; Perl version 5.26.1 documentation - Math::Trig $x = tan(0.9); $y = acos(3.7); $z = asin(2.4); $halfpi = pi/2; $rad = deg2rad(120); # Import
More informationScientific Functions Complex Numbers
CNBC Matlab Mini-Course Inf and NaN 3/0 returns Inf David S. Touretzky October 2017 Day 2: More Stuff 0/0 returns NaN 3+Inf Inf/Inf 1 -Inf, -NaN 4 Scientific Functions Complex Numbers Trig: Rounding: Modular:
More informationMatlab for Chemists. Theoretical Chemistry Radboud University The Netherlands
Matlab for Chemists Theoretical Chemistry Radboud University The Netherlands September 2017 ii PREFACE Matlab is an interactive program package for numerical computation and visualization. It originated
More informationUniversity of Alberta
A Brief Introduction to MATLAB University of Alberta M.G. Lipsett 2008 MATLAB is an interactive program for numerical computation and data visualization, used extensively by engineers for analysis of systems.
More informationWhat is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment
What is MATLAB? MATLAB PROGRAMMING Stands for MATrix LABoratory A software built around vectors and matrices A great tool for numerical computation of mathematical problems, such as Calculus Has powerful
More informationProf. Manoochehr Shirzaei. RaTlab.asu.edu
RaTlab.asu.edu Introduction To MATLAB Introduction To MATLAB This lecture is an introduction of the basic MATLAB commands. We learn; Functions Procedures for naming and saving the user generated files
More information1. GRAPHS OF THE SINE AND COSINE FUNCTIONS
GRAPHS OF THE CIRCULAR FUNCTIONS 1. GRAPHS OF THE SINE AND COSINE FUNCTIONS PERIODIC FUNCTION A period function is a function f such that f ( x) f ( x np) for every real numer x in the domain of f every
More informationPOLYMATH POLYMATH. for IBM and Compatible Personal Computers. for IBM and Compatible Personal Computers
POLYMATH VERSION 4.1 Provides System Printing from Windows 3.X, 95, 98 and NT USER-FRIENDLY NUMERICAL ANALYSIS PROGRAMS - SIMULTANEOUS DIFFERENTIAL EQUATIONS - SIMULTANEOUS ALGEBRAIC EQUATIONS - SIMULTANEOUS
More informationThis is called the horizontal displacement of also known as the phase shift.
sin (x) GRAPHS OF TRIGONOMETRIC FUNCTIONS Definitions A function f is said to be periodic if there is a positive number p such that f(x + p) = f(x) for all values of x. The smallest positive number p for
More informationYEAR 12 Core 1 & 2 Maths Curriculum (A Level Year 1)
YEAR 12 Core 1 & 2 Maths Curriculum (A Level Year 1) Algebra and Functions Quadratic Functions Equations & Inequalities Binomial Expansion Sketching Curves Coordinate Geometry Radian Measures Sine and
More informationECE 202 LAB 3 ADVANCED MATLAB
Version 1.2 1 of 13 BEFORE YOU BEGIN PREREQUISITE LABS ECE 201 Labs EXPECTED KNOWLEDGE ECE 202 LAB 3 ADVANCED MATLAB Understanding of the Laplace transform and transfer functions EQUIPMENT Intel PC with
More informationQuick MATLAB Syntax Guide
Quick MATLAB Syntax Guide Some useful things, not everything if-statement Structure: if (a = = = ~=
More informationOverview. Lecture 13: Graphics and Visualisation. Graphics & Visualisation 2D plotting. Graphics and visualisation of data in Matlab
Overview Lecture 13: Graphics and Visualisation Graphics & Visualisation 2D plotting 1. Plots for one or multiple sets of data, logarithmic scale plots 2. Axis control & Annotation 3. Other forms of 2D
More informationIntroduction to MATLAB Practical 1
Introduction to MATLAB Practical 1 Daniel Carrera November 2016 1 Introduction I believe that the best way to learn Matlab is hands on, and I tried to design this practical that way. I assume no prior
More informationHow to Design Programs Languages
How to Design Programs Languages Version 4.1 August 12, 2008 The languages documented in this manual are provided by DrScheme to be used with the How to Design Programs book. 1 Contents 1 Beginning Student
More information