MATLAB Trigonometry, Complex Numbers and Array Operations.

Slides:



Advertisements
Similar presentations
10.4 Trigonometric (Polar) Form of Complex Numbers
Advertisements

Copyright © 2009 Pearson Addison-Wesley Applications of Trigonometry.
Contents 17.1 Complex Numbers 17.2 Powers and Roots
Key Points Two complex numbers can be multiplied by expressing each number in the form z = x + jy, then using distributivity and the rule j2 = -1 (i.e.,
Math Review with Matlab:
Trigonometric Functions and the Unit Circle
10 Trigonometry (1) Contents 10.1 Basic Terminology of Trigonometry
Copyright © 2011 Pearson Education, Inc. Slide
Warm Up Convert each measure from degrees to radians ° °
Section 7.2 The Inverse Trigonometric Functions (Continued)
Chapter 4.1 Mathematical Concepts
Lecture 6 MATLAB functions Basics of Built-in Functions, Help Feature, Elementary Functions (e.g., Polynomials, Trigonometric Functions), Data Analysis,
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Vectors Sections 6.6.
Inverse Trigonometric Functions
Vectors Vectors and Scalars Vector: Quantity which requires both magnitude (size) and direction to be completely specified –2 m, west; 50 mi/h, 220 o.
1 Week 1 Complex numbers: the basics 1. The definition of complex numbers and basic operations 2. Roots, exponential function, and logarithm 3. Multivalued.
Laws of Sines and Cosines
1 Trigonometry Samuel Marateck © How some trigonometric identities presaged logarithms. We will be using complex numbers to simplify derivations.
6.8 Notes In this lesson you will learn how to… write trigonometric equations as inverse trigonometric relation equations. find the values that satisfy.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
6.4 Trigonometric Functions
5-5 Solving Right Triangles. Find Sin Ѳ = 0 Find Cos Ѳ =.7.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved Vectors, Operations, and the Dot Product 7.5Applications of Vectors Applications.
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Chapter 6 ADDITIONAL TOPICS IN TRIGONOMETRY. 6.1 Law of Sines Objectives –Use the Law of Sines to solve oblique triangles –Use the Law of Sines to solve,
6.3 Polar Coordinates Day One
Lecture 1: Complex Numbers
Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Copyright © 2009 Pearson Education, Inc. CHAPTER 8: Applications of Trigonometry 8.1The Law of Sines 8.2The Law of Cosines 8.3Complex Numbers: Trigonometric.
CSE123 Lecture 5 Arrays and Array Operations. Definitions Scalars: Variables that represent single numbers. Note that complex numbers are also scalars,
Vectors & Scalars.
Inverses of Trigonometric Functions 13-4
Copyright © 2011 Pearson, Inc. 4.7 Inverse Trigonometric Functions.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
Copyright © 2009 Pearson Addison-Wesley Complex Numbers, Polar Equations, and Parametric Equations.
Array Creation ENGR 1187 MATLAB 2. Today’s Topics  Arrays: What are they?  Vectors  Matrices  Creating Arrays.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 8 Complex Numbers, Polar Equations, and Parametric Equations.
Lesson 78 – Polar Form of Complex Numbers HL2 Math - Santowski 11/16/15.
8.2 Trigonometric (Polar) Form of Complex Numbers.
6.2 Trigonometric functions of angles
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
Copyright © 2007 Pearson Education, Inc. Slide Trigonometric (Polar) Form of Complex Numbers The Complex Plane and Vector Representations Call.
MATLAB Constants, Variables & Expression Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
Table of Contents Matrices - Definition and Notation A matrix is a rectangular array of numbers. Consider the following matrix: Matrix B has 3 rows and.
7 Trigonometric Identities and Equations © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.5–7.7.
Matrices. Matrix - a rectangular array of variables or constants in horizontal rows and vertical columns enclosed in brackets. Element - each value in.
8-3 Trigonometry Part 2: Inverse Trigonometric Functions.
Chapter 7 Trigonometry Chung Tai Educational Press © Chapter Examples Quit Chapter 7 Trigonometry Right-angled Triangles Adjacent side The side.
Trigonometry Section 7.4 Find the sine and cosine of special angles. Consider the angles 20 o and 160 o Note: sin 20 o = sin160 o and cos 20 o = -cos 160.
Introduction to Complex Numbers AC Circuits I. Outline Complex numbers basics Rectangular form – Addition – Subtraction – Multiplication – Division Rectangular.
Holt McDougal Algebra Inverses of Trigonometric Functions toolbox Pg. 953 (2-10;16-24;30-31, 41 why4)
Polar Coordinates Polar and Rectangular Coordinates Packet 3.
Analytic Trigonometry 7. Trigonometric Equations 7.5.
Inverse Trigonometric Functions
Numeric, Cell and Structural Arrays One of the strenghts of MATLAB is the capabilty to handle collection of numbers called ARRAYS. MATLAB refers to scalars,
ECE 1304 Introduction to Electrical and Computer Engineering
Introduction The Pythagorean Theorem is often used to express the relationship between known sides of a right triangle and the triangle’s hypotenuse.
Inverses of Trigonometric Functions 13-4
ECE 3301 General Electrical Engineering
Inverse Trigonometric Functions
Chapter 2 Complex Numbers
Complex Numbers and i is the imaginary unit
Polar Coordinates Polar and Rectangular Coordinates
EECS Introduction to Computing for the Physical Sciences
Copyright © 2017, 2013, 2009 Pearson Education, Inc.
Section 4.7.
Presentation transcript:

MATLAB Trigonometry, Complex Numbers and Array Operations

Basic Trigonometry

Basic Trigonometric Expressions in MATLAB sin(alpha) Sine of alpha cos(alpha) Cosine of alpha tan(alpha) Tangent of alpha asin(z) Arcsine or inverse sine of z, where z must be between.1 and 1. Returns an angle between.π/2 and π/2 (quadrants I and IV). acos(z) Arccosine or inverse cosine of z, where z must be between.1 and 1. Returns an angle between 0 and π (quadrants I and II). atan(z) Arctangent or inverse tangent of z. Returns an angle between.π/2 and π/2 (quadrants I and IV). atan2(y,x) Four quadrant arctangent or inverse tangent, where x and y are the coordinates in the plane shown in the.gure above. Returns an angle between -π and π (all quadrants), depending on the signs of x and y.

Hyperbolic Functions The hyperbolic functions are functions of the natural exponential function e x, where e is the base of the natural logarithms, which is approximately e = The inverse hyperbolic functions are functions of the natural logarithm function, ln x. The curve y = cosh x is called a catenary (from the Latin word meaning “chain”). A chain or rope, suspended from its ends, forms a curve that is part of a catenary.

Basic Hyperbolic Expressions in MATLAB

Complex Numbers Imaginary number: The most fundamental new concept in the study of complex numbers is the “imaginary number” j. This imaginary number is defined to be the square root of -1: j = √(-1) j 2 = -1

Complex Numbers - Rectangular Representatiton

Rectangular Representation: A complex number z consists of the “real part” x and the “imaginary part” y and is expressed as z = x + jy where x = Re[z]; y = Im[z]

Complex Numbers - Rectangular Representatiton A general complex number can be formed in three ways: >> z = 1 + j*2 z = i >> z = 1 + 2j z = i >> z = complex(1,2) z = i

Complex Numbers - Rectangular Representatiton >> z = 3 + 4j z = i >> x = real(z) x = 3 >> y = imag(z) y = 4

Polar Representation Defining the radius r and the angle θ of the complex number z can be represented in polar form and written as z = r cos θ + jr sin θ or, in shortened notation z = r θ

Polar Representation >> z = 3 + 4j; >> r = abs(z) r = 5 >> theta = angle(z) theta = theta = (180/pi)*angle(z) theta =

Polar Representation

Arrays and Array Operations Scalars: Variables that represent single numbers, as considered to this point. Note that complex numbers are scalars, even though they have two components, the real part and the imaginary part. Arrays: Variables that represent more than one number. Each number is called an element of the array. Rather than than performing the same operation on one number at a time, array operations allow operating on multiple numbers at once. Row and Column Arrays: A row of numbers (called a row vector) or a column of numbers (called a column vector). Two-Dimensional Arrays: A two-dimensional table of numbers, called a matrix. Array Indexing or Addressing: Indicates the location of an element in the array.

Vector Arrays Consider computing y = sin(x) for 0 ≤ x ≤ π. It is impossible to compute y values for all values of x, since there are an infinite number of values, so we will choose a finite number of x values. Consider computing y = sin(x), where x = 0, 0.1π, 0.2π,..., π You can form a list, or array of the values of x, and then using a calculator you can compute the corresponding values of y, forming a second array y. x and y are ordered lists of numbers, i.e., the first value or element of y is associated with the first value or element of x. Elements can be denoted by subscripts, e.g. x 1 is the first element in x, y 5 is the fifth element in y. The subscript is the index, address, or location of the element in the array.

Vector Creation By an explicit list, >> x=[0.1*pi.2*pi.3*pi.4*pi.5*pi.6*pi.7*pi.8*pi.9*pi pi] By a function, >>y=sin(x) Vector Addressing A vector element is addressed in Matlab with an integer index (also called a subscript) enclosed in parentheses. For example, to access the third element of x and the fifth element of y: >> x(3) ans = >> y(5) ans =

Colon Notation Addresses a block of elements The format for colon notation is: (start:increment:end) where start is the starting index, increment is the amount to add to each successive index, and end is the ending index, where start, increment, and end must be integers. The increment can be negative, but negative indices are not allowed to be generated. If the increment is to be 1, a shortened form of the notation may be used: (start:end)

Colon Notation Examples 1:5 means “start with 1 and count up to 5.” >> x(1:5) ans = :end means “start with 7 and count up to the end of the vector.” >> x(7:end) ans = :-1:1 means “start with 3 and count down to 1.” >> y(3:-1:1) ans = :2:7 means “start with 2, count up by 2, and stop at 7.” >> x(2:2:7) ans =