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

Size: px
Start display at page:

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

Transcription

1 Script started on Thu 25 Aug :00:40 PM CDT < M A T L A B (R) > Copyright The MathWorks, Inc. R2014a ( ) 64-bit (glnxa64) February 11, 2014 To get started, type one of these: helpwin, helpdesk, or demo. For product information, visit >> x = 5 x = 5 Your variables are: x >> x = y = x + 5 y = 10 >> y = x*5 y = 25 >> y = x^2 y = >> x x = 25 5 >> y = x^3

2 y = 125 >> y = y = -5 >> y = 3*2+3*2 y = 12 >> y = 3* 2+3 * 2 y = 12 >> y = 3* (2+3) * 2 y = 30 >> y = 5 y = 5 >> x = 3 x = 3 >> x/y >> y/x >> x\y Commented [LS1]: X divides into y. Seldom used. Not as intuitive.

3 >> y\x >> help elfun Elementary math functions. Trigonometric. sin - Sine. sind - Sine of argument in degrees. sinh - Hyperbolic sine. asin - Inverse sine. asind - Inverse sine, result in degrees. asinh - Inverse hyperbolic sine. cos - Cosine. cosd - Cosine of argument in degrees. cosh - Hyperbolic cosine. acos - Inverse cosine. acosd - Inverse cosine, result in degrees. acosh - Inverse hyperbolic cosine. tan - Tangent. tand - Tangent of argument in degrees. tanh - Hyperbolic tangent. atan - Inverse tangent. atand - Inverse tangent, result in degrees. atan2 - Four quadrant inverse tangent. atan2d - Four quadrant inverse tangent, result in degrees. atanh - Inverse hyperbolic tangent. sec - Secant. secd - Secant of argument in degrees. sech - Hyperbolic secant. asec - Inverse secant. asecd - Inverse secant, result in degrees. asech - Inverse hyperbolic secant. csc - Cosecant. cscd - Cosecant of argument in degrees. csch - Hyperbolic cosecant. acsc - Inverse cosecant. acscd - Inverse cosecant, result in degrees. acsch - Inverse hyperbolic cosecant. cot - Cotangent. cotd - Cotangent of argument in degrees. coth - Hyperbolic cotangent. acot - Inverse cotangent. acotd - Inverse cotangent, result in degrees. acoth - Inverse hyperbolic cotangent. hypot - Square root of sum of squares.

4 Exponential. exp - Exponential. expm1 - Compute exp(x)-1 accurately. log - Natural logarithm. log1p - Compute log(1+x) accurately. log10 - Common (base 10) logarithm. log2 - Base 2 logarithm and dissect floating point number. pow2 - Base 2 power and scale floating point number. realpow - Power that will error out on complex result. reallog - Natural logarithm of real number. realsqrt - Square root of number greater than or equal to zero. sqrt - Square root. nthroot - Real n-th root of real numbers. nextpow2 - Next higher power of 2. Complex. abs angle complex conj imag real unwrap isreal cplxpair - Absolute value. - Phase angle. - Construct complex data from real and imaginary parts. - Complex conjugate. - Complex imaginary part. - Complex real part. - Unwrap phase angle. - True for real array. - Sort numbers into complex conjugate pairs. Rounding and remainder. fix - Round towards zero. floor - Round towards minus infinity. ceil - Round towards plus infinity. round - Round towards nearest integer. mod - Modulus (signed remainder after division). rem - Remainder after division. sign - Signum. >> floor( ) 1 >> ceil( ) 2 >> round(1.3) 1

5 >> round(1.6) 2 >> round(1.5) 2 >> rem(3,5) 3 >> abs(-1) 1 >> abs(1) 1 >> pi >> 0/1 0 >> 1/0 Inf >> 0/0 NaN

6 ans 1x1 8 double y 1x1 8 double >> z = Commented [LS2]: This is type double. z = >> z1_int = int16(z) z_int = Commented [LS3]: With this, I type-cast the double into an integer of 16 bits and store it in z1_int, another variable. 3 ans 1x1 8 double y 1x1 8 double >> z_int8 = int8( ) Commented [LS4]: z is still a double. Commented [LS5]: z_int is an integer of 16 bits. What is the largest number that int16 can represent? z_int8 = 10 ans 1x1 8 double y 1x1 8 double z_int8 1x1 1 int8 >> z_int8 = z_int8 =

7 ans 1x1 8 double y 1x1 8 double z_int8 1x1 8 double >> intmin('int8') Commented [LS6]: Convenience (AND POTENTIAL PIT FALL!!) MATLAB automatically change the type of the variable z_int8 from an integer of 8 bits to a double of 8 bytes!! -128 >> intmax('int8') 127 >> intmin('uint8') 0 >> intmax('uint8') 255 >> y = 'a' y = a ans 1x1 1 uint8 y 1x1 2 char z_int8 1x1 8 double >> z_string = 'abcde' z_string = abcde

8 ans 1x1 1 uint8 y 1x1 2 char z_int8 1x1 8 double z_string 1x5 10 char Commented [LS7]: A vector of 5 characters. Length = 5. >> z_string = 'ab cde' z_string = ab cde ans 1x1 1 uint8 y 1x1 2 char z_int8 1x1 8 double z_string 1x6 12 char >> red_flag = 'true' red_flag = Commented [LS8]: This is assigning a string (i.e., a vector of characters) to the variable red_flag. true ans 1x1 1 uint8 red_flag 1x4 8 char y 1x1 2 char z_int8 1x1 8 double z_string 1x6 12 char >> red_flag = true red_flag = 1 Commented [LS9]: As a result, this is still a vector of characters. Commented [LS10]: This makes red_flag a logical variable. Commented [LS11]: This is a keyword. And it is represented internally in Matlab as 1.

9 ans 1x1 1 uint8 red_flag 1x1 1 logical y 1x1 2 char z_int8 1x1 8 double z_string 1x6 12 char >> red_flag = false red_flag = Commented [LS12]: See, now this is a logical variable. Commented [LS13]: Another keyword. Represented internally as 0. 0 >> num = int32('a') num = Commented [LS14]: American Standard Code for Information Exchange Every letter on our keyboard is represented by a number. 97 >> num = int32('b ) num = 98 >> num = int32( c') num = 99 >> num = int32('a ) num = 65 >> num = int32( B ) num = 66 >> num = int32('c ) num = 67 >> num = int32(? ) num =

10 63 >> num = int32('$ ) num = 36 >> num = int32('# ) num = 35 >> num = int32(' ) num = 32 >> char('abcd' + 1) Commented [LS15]: Cool!!! I can shift the characters by 1! bcde >> v = [ ] v = ans 1x4 8 char num 1x1 4 int32 red_flag 1x1 1 logical v 1x5 40 double y 1x1 2 char z_int8 1x1 8 double z_string 1x6 12 char >> v c = [1; 2; 3 ; ; 4; 5] c =

11 5 >> matrix 2 = [1 2; 3 4] m2 = >> m3 = [1 2 3; ] m3 = >> m3 = [1 2 3; ]]1]0]; ]4; ]; ;]]7]]8]]9]]1]0]]] m3 = [ ; ; ]] {Error: Unbalanced or unexpected parenthesis or bracket. } >> m3 = [ ; ; ]]] m3 = >> vec = [1: 5 1:5 vec = >> vec = 1:2:11 vec = >> vec 1 = 1:2: >> v2 = 11:17 v2 =

12 >> newvector = [v1 v2] newvector = ans 1x4 8 char c 5x1 40 double m2 2x2 32 double m3 3x4 96 double newvector 1x12 96 double num 1x1 4 int32 red_flag 1x1 1 logical v 1x5 40 double v1 1x5 40 double v2 1x7 56 double vec 1x6 48 double y 1x1 2 char z_int8 1x1 8 double z_string 1x6 12 char >> newvector(1) 1 >> newvector(1)1) 2) 3 >> newvector newvector = >> newvecotr tor[2] newvector[2] {Error: Unbalanced or unexpected parenthesis or bracket. } >> newcge vector(2)

13 3 >> newvector(6) 11 >> newvector(4:5 6( ) >> newvectro([11 or([ ]) >> ans' >> newvector newvector = >> newvector(5) 1) = 10 newvector = >> newvector(13) = newvector = Columns 1 through Columns 10 through >> newvector(13) = 1000) = ) = 1000

14 newvector = Columns 1 through Columns 10 through >> vecto 1 = [ ] >> v1' >> v1 v1' ' >> v1' >> v1' >> v1'

15 >> v1' >> v1' >> mat = [ ; 2 5 6] mat = >> mat(1) >> mat(6) 6 >> mat(2) 2 >> mat(2)) 3) 3 >> mat(3) 4) 5

16 >> mat(4) 5) 1 >> mat mat = >> rand2 (2) >> rand(3) >> rand(1,30 ) >> zeros(3) >> ones(3) >> twos(3) {Undefined function 'twos' for input arguments of type 'double'. }

17 >> int mat = [100 77; 28 14] mat = >> in mat(1) = 100 mat = >> mat(1) = mat = >> mat(1) = 28 ) = 2) = ) = 6 0 mat = >> mat mat = >> mat(2,:) = [ ] mat = >> mat(:,2) = [ ] mat = >> v

18 >> lengtyh h(v1) 4 >> le length(mat) 2 >> size9 (mat) 2 2 >> matrix mymatr = [1 2 3; ] mymat = >> si z size(myamat mat) 2 3 >> reshape rto ot(mymat) {Undefined function 'rot' for input arguments of type 'double'. } >> rot90(mymat) >> rot90 fliplr(k mymat) >> flipud(mymat)

19 >> v = [] v = [] >> m vec >> [] [] ans 2x3 48 double c 5x1 40 double m2 2x2 32 double m3 3x4 96 double mat 2x2 32 double mymat 2x3 48 double newvector 1x double num 1x1 4 int32 red_flag 1x1 1 logical v 0x0 0 double v1 0x0 0 double v2 1x7 56 double vec 1x6 48 double y 1x1 2 char z_int8 1x1 8 double z_string 1x6 12 char >> vec = 1:5 vec = >> vec(3) = [] vec =

20 >> exit [?1l>[1mcse[0m fac/lksoh> exit exit Script done on Thu 25 Aug :16:37 PM CDT

Matlab Workshop I. Niloufer Mackey and Lixin Shen

Matlab 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 information

BRUNO WELFERT Arizona State University AND. R. Kent Nagle. University of South Florida. Edward B. Saff. Vanderbilt University. A.

BRUNO 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 information

Programming in MATLAB

Programming 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 information

National Workshop on LaTeX and MATLAB for Beginners

National Workshop on LaTeX and MATLAB for Beginners BITS Pilani Pilani Campus National Workshop on LaTeX and MATLAB for Beginners 24-28 December, 2014 Partially Supported By: DST-Rajasthan BITS Pilani Pilani Campus Lecture-9 (Dr. Trilok Mathur) Creation

More information

LAB 1 General MATLAB Information 1

LAB 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 information

Introduction to Scientific and Engineering Computing, BIL108E. Karaman

Introduction 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 information

General MATLAB Information 1

General 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 information

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

Starting 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 information

A. Matrix-wise and element-wise operations

A. 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 information

MATLAB Workshop Dr. M. T. Mustafa Department of Mathematical Sciences. Introductory remarks

MATLAB 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 information

Arithmetic and Logic Blocks

Arithmetic 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 information

Lecture 1: What is MATLAB?

Lecture 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 information

Introduction to MATLAB

Introduction 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 information

GRAPH 4.4. Megha K. Raman APRIL 22, 2015

GRAPH 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 information

Introduction to MATLAB

Introduction 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 information

Introduction to MATLAB

Introduction 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 information

Ebooks Chemical Engineering

Ebooks 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 information

MATLAB Constants, Variables & Expression. 9/12/2015 By: Nafees Ahmed

MATLAB 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 information

Introduction to MATLAB for CSE390

Introduction 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 information

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

Consider 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 information

A very short introduction to Matlab and Octave

A 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 information

A General Introduction to Matlab

A 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 information

MATLAB: a Brief Introduction. by Robert L. Rankin

MATLAB: 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 information

Built-in Types of Data

Built-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 information

Introduction to Matlab

Introduction 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 information

# Import constants pi2, pip2, pip4 (2*pi, pi/2, pi/4). use Math::Trig ':pi';

# 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 information

Section 5.3 Graphs of the Cosecant and Secant Functions 1

Section 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 information

Introduction to GNU-Octave

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

More information

Scientific Computing Lecture 1: MATLAB fundamentals

Scientific 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 information

Dr Richard Greenaway

Dr 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 information

PIV 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. 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 information

Chapter 1 MATLAB Preliminaries

Chapter 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 information

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

Outline. CSE 1570 Interacting with MATLAB. Outline. Starting MATLAB. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An. CSE 10 Interacting with MATLAB Instructor: Aijun An Department of Computer Science and Engineering York University aan@cse.yorku.ca Outline Starting MATLAB MATLAB Windows Using the Command Window Some

More information

Introduction to MATLAB

Introduction 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 information

Introduction to Matlab. Matlab variable types. Matlab variable types. Matlab variable types. Notes. Eugeniy E. Mikhailov. Lecture 02. Notes.

Introduction 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 information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Dr./ Ahmed Nagib Mechanical Engineering department, Alexandria university, Egypt Sep 2015 Chapter 5 Functions Getting Help for Functions You can use the lookfor command to find functions

More information

Inlichtingenblad, matlab- en simulink handleiding en practicumopgaven IWS

Inlichtingenblad, 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 information

6-1 (Function). (Function) !*+!"#!, Function Description Example. natural logarithm of x (base e) rounds x to smallest integer not less than x

6-1 (Function). (Function) !*+!#!, Function Description Example. natural logarithm of x (base e) rounds x to smallest integer not less than x (Function) -1.1 Math Library Function!"#! $%&!'(#) preprocessor directive #include !*+!"#!, Function Description Example sqrt(x) square root of x sqrt(900.0) is 30.0 sqrt(9.0) is 3.0 exp(x) log(x)

More information

The Official Guide to Easy Graphing. ParaGraph. Ver Congratulations Graphing just got easier.

The 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 information

The Graphing Calculator

The 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 information

# Import constants pi2, pip2, pip4 (2*pi, pi/2, pi/4). use Math::Trig ':pi';

# 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 information

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

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An. CSE 170 Interacting with MATLAB Instructor: Aijun An Department of Computer Science and Engineering York University aan@cse.yorku.ca Outline Starting MATLAB MATLAB Windows Using the Command Window Some

More information

A very brief Matlab introduction

A 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 information

Using GNU Octave for Numerical Methods

Using 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 information

A QUICK INTRODUCTION TO MATLAB

A 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 information

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

MATLAB 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 information

GNU libmatheval manual

GNU libmatheval manual GNU libmatheval manual Manual edition 1.1.9 For GNU libmatheval version 1.1.9 Last updated 22 September 2012 Aleksandar Samardzic Copyright c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Aleksandar

More information

Math 1330 Section 5.3 Graphs of the Tangent, Cotangent, Secant, and Cosecant Functions

Math 1330 Section 5.3 Graphs of the Tangent, Cotangent, Secant, and Cosecant Functions Math 1330 Section 5.3 Graphs of the Tangent, Cotangent, Secant, and Cosecant Functions In this section, you will learn to graph the rest of the trigonometric functions. We can use some information from

More information

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

Experiment 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 information

Julia Calculator ( Introduction)

Julia Calculator ( Introduction) Julia Calculator ( Introduction) Julia can replicate the basics of a calculator with the standard notations. Binary operators Symbol Example Addition + 2+2 = 4 Substraction 2*3 = 6 Multify * 3*3 = 9 Division

More information

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

MATLAB 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 information

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

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline (Cont d) MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An CSE 170 Interacting with MATLAB Instructor: Aijun An Department of Computer Science and Engineering York University aan@cse.yorku.ca Outline Starting MATLAB MATLAB Windows Using the Command Window Some

More information

A QUICK INTRODUCTION TO MATLAB. Intro to matlab getting started

A 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 information

Lecturer: Keyvan Dehmamy

Lecturer: 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 information

Basic types and definitions. Chapter 3 of Thompson

Basic types and definitions. Chapter 3 of Thompson Basic types and definitions Chapter 3 of Thompson Booleans [named after logician George Boole] Boolean values True and False are the result of tests are two numbers equal is one smaller than the other

More information

Lecture 14. Daily Puzzle. Math in C. Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =?

Lecture 14. Daily Puzzle. Math in C. Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =? Lecture 14 Math in C Daily Puzzle Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =? Daily Puzzle SOLUTION Eleven plus two = twelve plus one Announcements

More information

x,,, (All real numbers except where there are

x,,, (All real numbers except where there are Section 5.3 Graphs of other Trigonometric Functions Tangent and Cotangent Functions sin( x) Tangent function: f( x) tan( x) ; cos( x) 3 5 Vertical asymptotes: when cos( x ) 0, that is x,,, Domain: 3 5

More information

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

POLYMATH 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 information

Single row numeric functions

Single 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 information

Finding, Starting and Using Matlab

Finding, 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 information

Section 6.2 Graphs of the Other Trig Functions

Section 6.2 Graphs of the Other Trig Functions Section 62 Graphs of the Other Trig Functions 369 Section 62 Graphs of the Other Trig Functions In this section, we will explore the graphs of the other four trigonometric functions We ll begin with the

More information

Computer Programming in MATLAB

Computer Programming in MATLAB Computer Programming in MATLAB Prof. Dr. İrfan KAYMAZ Atatürk University Engineering Faculty Department of Mechanical Engineering What is a computer??? Computer is a device that computes, especially a

More information

Fundamentals of MATLAB Usage

Fundamentals 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 information

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

Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2017 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

More information

Introduction to MATLAB

Introduction to MATLAB to MATLAB Spring 2019 to MATLAB Spring 2019 1 / 39 The Basics What is MATLAB? MATLAB Short for Matrix Laboratory matrix data structures are at the heart of programming in MATLAB We will consider arrays

More information

PROGRAMMING WITH MATLAB DR. AHMET AKBULUT

PROGRAMMING WITH MATLAB DR. AHMET AKBULUT PROGRAMMING WITH MATLAB DR. AHMET AKBULUT OVERVIEW WEEK 1 What is MATLAB? A powerful software tool: Scientific and engineering computations Signal processing Data analysis and visualization Physical system

More information

Introduction to Scilab

Introduction to Scilab Introduction to Scilab Michaël Baudin November 2010 Abstract In this document, we make an overview of Scilab features so that we can get familiar with this environment. The goal is to present the core

More information

MYSQL NUMERIC FUNCTIONS

MYSQL NUMERIC FUNCTIONS MYSQL NUMERIC FUNCTIONS http://www.tutorialspoint.com/mysql/mysql-numeric-functions.htm Copyright tutorialspoint.com MySQL numeric functions are used primarily for numeric manipulation and/or mathematical

More information

Introduction to MATLAB Programming

Introduction to MATLAB Programming Introduction to MATLAB Programming Arun A. Balakrishnan Asst. Professor Dept. of AE&I, RSET Overview 1 Overview 2 Introduction 3 Getting Started 4 Basics of Programming Overview 1 Overview 2 Introduction

More information

Introduction to MATLAB 7 for Engineers

Introduction to MATLAB 7 for Engineers Introduction to MATLAB 7 for Engineers William J. Palm III Chapter 3 Functions and Files Getting Help for Functions You can use the lookfor command to find functions that are relevant to your application.

More information

Macro Programming Reference Guide. Copyright 2005 Scott Martinez

Macro 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 information

Introduction to Scilab

Introduction to Scilab Introduction to Scilab Michaël Baudin January 2010 Abstract In this document, we make an overview of Scilab features so that we can get familiar with this environment as fast as possible. The goal is to

More information

Introduction to Scilab

Introduction to Scilab Introduction to Scilab Michaël Baudin September 2011 Abstract In this document, we make an overview of Scilab features so that we can get familiar with this environment. The goal is to present the core

More information

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

This 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 information

Some elements for Matlab programming

Some 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 information

Matlab as a calculator

Matlab as a calculator Why Matlab? Matlab is an interactive, high-level, user-friendly programming and visualization environment. It allows much faster programs development in comparison with the traditional low-level compiled

More information

short-reference.mht 1/ /WK/

short-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 information

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University Lesson #3 Variables, Operators, and Expressions Variables We already know the three main types of variables in C: int, char, and double. There is also the float type which is similar to double with only

More information

I. Introduction to Programming Using MATLAB

I. Introduction to Programming Using MATLAB I. Introduction to Programming Using MATLAB Chapter 1: Introduction to MATLAB Exercises 1) Create a variable to store the atomic weight of silicon (28.085). >> siliconatwt = 28.085 siliconatwt = 28.0850

More information

1. GRAPHS OF THE SINE AND COSINE FUNCTIONS

1. 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 information

ECET 264 C Programming Language with Applications

ECET 264 C Programming Language with Applications ECET 264 C Programming Language with Applications Lecture 10 C Standard Library Functions Paul I. Lin Professor of Electrical & Computer Engineering Technology http://www.etcs.ipfw.edu/~lin Lecture 10

More information

Sum and Difference Identities. Cosine Sum and Difference Identities: cos A B. does NOT equal cos A. Cosine of a Sum or Difference. cos B.

Sum and Difference Identities. Cosine Sum and Difference Identities: cos A B. does NOT equal cos A. Cosine of a Sum or Difference. cos B. 7.3 Sum and Difference Identities 7-1 Cosine Sum and Difference Identities: cos A B Cosine of a Sum or Difference cos cos does NOT equal cos A cos B. AB AB EXAMPLE 1 Finding Eact Cosine Function Values

More information

A Guide to Using Some Basic MATLAB Functions

A 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 information

Math 2250 MATLAB TUTORIAL Fall 2005

Math 2250 MATLAB TUTORIAL Fall 2005 Math 2250 MATLAB TUTORIAL Fall 2005 Math Computer Lab The Mathematics Computer Lab is located in the T. Benny Rushing Mathematics Center (located underneath the plaza connecting JWB and LCB) room 155C.

More information

AMS 27L LAB #1 Winter 2009

AMS 27L LAB #1 Winter 2009 AMS 27L LAB #1 Winter 2009 Introduction to MATLAB Objectives: 1. To introduce the use of the MATLAB software package 2. To learn elementary mathematics in MATLAB Getting Started: Log onto your machine

More information

INTRODUCTION TO MATLAB. Padmanabhan Seshaiyer

INTRODUCTION 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 information

Mentor Graphics Predefined Packages

Mentor Graphics Predefined Packages Mentor Graphics Predefined Packages Mentor Graphics has created packages that define various types and subprograms that make it possible to write and simulate a VHDL model within the Mentor Graphics environment.

More information

Introduction to Programming

Introduction to Programming Introduction to Programming session 9 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology Outlines

More information

C Functions. 5.2 Program Modules in C

C Functions. 5.2 Program Modules in C 1 5 C Functions 5.2 Program Modules in C 2 Functions Modules in C Programs combine user-defined functions with library functions - C standard library has a wide variety of functions Function calls Invoking

More information

How to Design Programs Languages

How 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

ELEMENTARY MATLAB PROGRAMMING

ELEMENTARY MATLAB PROGRAMMING 1 ELEMENTARY MATLAB PROGRAMMING (Version R2013a used here so some differences may be encountered) COPYRIGHT Irving K. Robbins 1992, 1998, 2014, 2015 All rights reserved INTRODUCTION % It is assumed the

More information

CT 229 Java Syntax Continued

CT 229 Java Syntax Continued CT 229 Java Syntax Continued 06/10/2006 CT229 Lab Assignments Due Date for current lab assignment : Oct 8 th Before submission make sure that the name of each.java file matches the name given in the assignment

More information

Trigonometric Functions of Any Angle

Trigonometric 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 information

1001ICT Introduction To Programming Lecture Notes

1001ICT Introduction To Programming Lecture Notes 1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 1, 2015 1 M Environment console M.1 Purpose This environment supports programming

More information

Graphs of Other Trig Functions

Graphs of Other Trig Functions Graph y = tan. y 0 0 6 3 3 3 5 6 3 3 1 Graphs of Other Trig Functions.58 3 1.7 undefined 3 3 3 1.7-1 0.58 3 CHAT Pre-Calculus 3 The Domain is all real numbers ecept multiples of. (We say the domain is

More information

Math 144 Activity #3 Coterminal Angles and Reference Angles

Math 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 information

Matlab for Chemists. Theoretical Chemistry Radboud University The Netherlands

Matlab 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 information

VARIABLES Storing numbers:

VARIABLES Storing numbers: VARIABLES Storing numbers: You may create and use variables in Matlab to store data. There are a few rules on naming variables though: (1) Variables must begin with a letter and can be followed with any

More information

Precalculus Solutions Review for Test 6 LMCA Section

Precalculus Solutions Review for Test 6 LMCA Section Precalculus Solutions Review for Test 6 LMCA Section 4.5-4.8 Memorize all of the formulas and identities. Here are some of the formulas for chapter 5. BasicTrig Functions opp y hyp r sin csc hyp r opp

More information

Function Example. Function Definition. C Programming. Syntax. A small program(subroutine) that performs a particular task. Modular programming design

Function Example. Function Definition. C Programming. Syntax. A small program(subroutine) that performs a particular task. Modular programming design What is a Function? C Programming Lecture 8-1 : Function (Basic) A small program(subroutine) that performs a particular task Input : parameter / argument Perform what? : function body Output t : return

More information