Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2017

Similar documents
Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Mathematics Department, Ohio University, 2017

MATLAB QUICK START TUTORIAL

Introduction to Engineering gii

LAB 1 General MATLAB Information 1

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment

Introduction to Matlab

Starting MATLAB To logon onto a Temple workstation at the Tech Center, follow the directions below.

Introduction to MATLAB

CSI31 Lecture 5. Topics: 3.1 Numeric Data Types 3.2 Using the Math Library 3.3 Accumulating Results: Factorial

Lab 1 - Worksheet Spring 2013

Introduction to MATLAB 7 for Engineers

Basic stuff -- assignments, arithmetic and functions

PROGRAMMING WITH MATLAB DR. AHMET AKBULUT

Sketchify Tutorial Properties and Variables. sketchify.sf.net Željko Obrenović

AMS 27L LAB #1 Winter 2009

MATLAB Basics EE107: COMMUNICATION SYSTEMS HUSSAIN ELKOTBY

General MATLAB Information 1

Chapter 1 Introduction to MATLAB

Introduction to Matlab

MATLAB Lesson I. Chiara Lelli. October 2, Politecnico di Milano

TECH TIP VISION Calibration and Data Acquisition Software

MATLAB Commands and Functions

Programming in MATLAB

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An.

Matlab Programming Introduction 1 2

Scalar and matrix exponentiation operator.

Introduction to MATLAB

Programming in Mathematics. Mili I. Shah

What is Matlab? The command line Variables Operators Functions

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline (Cont d) MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An

To start using Matlab, you only need be concerned with the command window for now.

EP375 Computational Physics

This is a basic tutorial for the MATLAB program which is a high-performance language for technical computing for platforms:

A General Introduction to Matlab

Starting Matlab. MATLAB Laboratory 09/09/10 Lecture. Command Window. Drives/Directories. Go to.

Basic MATLAB Tutorial

Consider this m file that creates a file that you can load data into called rain.txt

Dr Richard Greenaway

Outline. CSE 1570 Interacting with MATLAB. Outline. Starting MATLAB. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An.

Matlab Notes for Calculus 3. Lia Vas

Introduction to MATLAB. Computational Probability and Statistics CIS 2033 Section 003

Fundamentals of MATLAB Usage

Chapter 3 Functions and Files

Lecture 7 Symbolic Computations

Chapter 1 MATLAB Preliminaries

MATLAB Tutorial EE351M DSP. Created: Thursday Jan 25, 2007 Rayyan Jaber. Modified by: Kitaek Bae. Outline

Dr Richard Greenaway

This is called the horizontal displacement of also known as the phase shift.

1 Week 1: Basics of scientific programming I

MATH 3511 Basics of MATLAB

Constraint-based Metabolic Reconstructions & Analysis H. Scott Hinton. Matlab Tutorial. Lesson: Matlab Tutorial

Experiment 1: Introduction to MATLAB I. Introduction. 1.1 Objectives and Expectations: 1.2 What is MATLAB?

Goals for This Lecture:

Introduction to MATLAB Practical 1

Welcome to EGR 106 Foundations of Engineering II

Introduction to MATLAB

MatLab Just a beginning

2.0 MATLAB Fundamentals

MATH 5520 Basics of MATLAB

Computer Programming in MATLAB

Introduction to MATLAB for CSE390

Introduction to Matlab. By: Dr. Maher O. EL-Ghossain

Interactive Computing with Matlab. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University

Functions and Inverses ID1050 Quantitative & Qualitative Reasoning

Introduction to Programming

A GUIDE FOR USING MATLAB IN COMPUTER SCIENCE AND COMPUTER ENGINEERING TABLE OF CONTENTS

Matlab Tutorial. The value assigned to a variable can be checked by simply typing in the variable name:

Ordinary Differential Equation Solver Language (ODESL) Reference Manual

MATH (CRN 13695) Lab 1: Basics for Linear Algebra and Matlab

MAT 343 Laboratory 1 Matrix and Vector Computations in MATLAB

Python Programming: An Introduction to Computer Science

Digital Image Analysis and Processing CPE

INTRODUCTION TO MATLAB FOR ENGINEERING STUDENTS. David Houcque Northwestern University

USER-DEFINED ELEMENT IN ZMAN TM

Ebooks Chemical Engineering

Introduction to MATLAB for Numerical Analysis and Mathematical Modeling. Selis Önel, PhD

Welcome. Please Sign-In

GRAPH 4.4. Megha K. Raman APRIL 22, 2015

Finding, Starting and Using Matlab

Introduction to MATLAB for Engineers, Third Edition

Summary of basic C++-commands

Script started on Thu 25 Aug :00:40 PM CDT

Matlab Tutorial, CDS

Introduction to MATLAB 7 for Engineers

The Graphing Calculator

Introduction to MatLab. Introduction to MatLab K. Craig 1

A QUICK INTRODUCTION TO MATLAB

Introduction to PartSim and Matlab

MATLAB Quick Reference

MATLAB NOTES. Matlab designed for numerical computing. Strongly oriented towards use of arrays, one and two dimensional.

A QUICK INTRODUCTION TO MATLAB. Intro to matlab getting started

5-2 Verifying Trigonometric Identities

1.1 ABOUT MATLAB and MATLAB GUI (Graphical User Interface)

POLYMATH POLYMATH. for IBM and Compatible Personal Computers. for IBM and Compatible Personal Computers

Introduction to MATLAB

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

MYSQL NUMERIC FUNCTIONS

MATLAB Tutorial. Digital Signal Processing. Course Details. Topics. MATLAB Environment. Introduction. Digital Signal Processing (DSP)

Introduction to Scientific and Engineering Computing, BIL108E. Karaman

Mastery. PRECALCULUS Student Learning Targets

Transcription:

Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2017

Appendix A Glossary of Matlab Commands Mathematical Operations + Addition. Type help plus for information. - Subtraction. Type help minus for information. * Scalar or matrix multiplication. Type help mtimes for information. / Scalar or right matrix division. Type help slash for information. For matrices, the command A/B is equivalent to A*inv(B). ^ Scalar or matrix powers. Type help mpower for information..* Element by element multiplication. Type help times for information..^ Element by element exponentiation. Type help power for information../ Element by element division. Built-in Mathematical Constants eps Machine epsilon, i.e. approximately the computer s floating point roundoff error. i 1. Inf. NaN Not a number. Indicates an invalid operation such as 0/0. pi π = 3.14159.... Built-in Mathematical Functions abs(x) Absolute value x. acos(x) Inverse cosine arccos x. 168

169 asin(x) Inverse sine arcsin x. atan(x) Inverse tangent arctan x. cos(x) Cosine cos x. cosh(x) Hyperbolic cosine cosh x. cot(x) Cotangent cot x. exp(x) Exponential function e x = exp x. log(x) Natural logarithm ln x = log e x. sec(x) Secant sec x. sin(x) Sine sin x. sinh(x) Hyperbolic sine sinh x. sqrt(x) Square root x. tan(x) Tangent tan x. tanh(x) Hyperbolic tangent tanh x. max Computes maximum of the rows of a matrix. mean Computes the average of the rows of a matrix. min Computes the minimum of the rows of a matrix. Built-in Numerical Mathematical Operations fzero Tries to find a zero of the specified function near a starting point or on a specified interval. inline Define a function in the command window. ode113 Numerical multiple step ODE solver. ode45 Runga-Kutta 45 numerical ODE solver. quad Numerical integration using an adaptive Simpson s rule. dblquad Double integration. triplequad Triple integration. Built-in Symbolic Mathematical Operations collect compose diff double dsolve Collects powers of the specified variable is a given symbolic expression. Composition of symbolic functions. Symbolic differentiation. Displays double-precision representation of a symbolic expression. Symbolic ODE solver.

170 APPENDIX A. GLOSSARY OF MATLAB COMMANDS expand Expands an algebraic expression. factor Factor a polynomial. int Symbolic integration; either definite or indefinite. limit Finds two-sided limit, if it exists. pretty Displays a symbolic expression in a nice format. simple Simplifies a symbolic expression. subs Substitutes for parts a a symbolic expression. sym or syms Create symbolic variables. symsum Performs a symbolic summation, possibly with infinitely many entries. taylor Gives a Taylor polynomial approximation of a given order at a specified point. Graphics Commands contour contourf ezcontour loglog mesh meshgrid ezmesh plot ezplot plot3 polar quiver semilogy surf trimesh trisurf Plots level curves of a function of two variables. Filled contour plot. Easy contour plot. Creates a log-log plot. Draws a mesh surface. Creates arrays that can be used as inputs in graphics commands such as contour, mesh, quiver, and surf. Easy mesh surface plot. Plots data vectors. Easy plot for symbolic functions. Plots curves in 3-D. Plots in polar coordinates. Plots a vector field. Semilog plot, with logarithmic scale along the vertical direction. Solid surface plot. Plot based on a triangulation Surface plot based on a triangulation

171 Special Matlab Commands : Range operator, used for defining vectors and in loops. Type help colon for information. ; Suppresses output. Also separates rows of a matrix. = Assigns the variable on the left hand side the value of the right hand side. ans The value of the most recent unassigned. cd Change directory. clear Clears all values and definitions of variables and functions. You may also use to clear only specified variables. diary Writes a transcript of a Matlab session to a file. dir Lists the contents in the current working directory. Same as ls. help inline Define an inline function. format Specifies output format, e.g. > format long. load Load variables from a file. save Saves workspace variables to a file. Matlab Programming == Is equal? ~= Is not equal? < Less than? > Greater than? <= Less than or equal? break Breaks out of a for or while loop. end Terminates an if, for or while statement. else Alternative in an if statement. error Displays and error message and ends execution of a program. for Repeats a block of commands a specified number of times. function First word in a function program. if Checks a condition before executing a block of statements. return Terminates execution of a program. warning Displays a warning message. while Repeats a block of commands as long as a condition is true.

172 APPENDIX A. GLOSSARY OF MATLAB COMMANDS Commands for Matrices and Linear Algebra Matrix arithmetic: A = [ 1 3-2 5 ; -1-1 5 4 ; 0 1-9 0]..................... Manually enter a matrix. u = [ 1 2 3 4] A*u B = [3 2 1; 7 6 5; 4 3 2] B*A.........................................................................multiply B times A. 2*A............................................................... multiply a matrix by a scalar. A + A............................................................................. add matrices. A + 3................................................. add a number to every entry of a matrix. B.*B............................................................ component-wise multiplication. B.^3............................................................component-wise exponentiation. Special matrices: I = eye(3)..................................................................... identity matrix D = ones(5,5) O = zeros(10,10) C = rand(5,5)............................... random matrix with uniform distribution in [0, 1]. C = randn(5,5).......................................random matrix with normal distribution. hilb(6) pascal(5) General matrix commands: size(c)..................................................... gives the dimensions (m n) of A. norm(c)...........................................................gives the norm of the matrix. det(c)...........................................................the determinant of the matrix. max(c)...............................................................the maximum of each row. min(c)............................................................... the minimum in each row. sum(c).......................................................................... sums each row. mean(c)................................................................ the average of each row. diag(c)............................................................. just the diagonal elements. inv(c).................................................................... inverse of the matrix.

173 Matrix decompositions: [L U P] = lu(c) [Q R] = qr(c) [U S V] = svd(c)................................................ singular value decomposition.

174 APPENDIX A. GLOSSARY OF MATLAB COMMANDS