ECE 1304 Introduction to Electrical and Computer Engineering

Slides:



Advertisements
Similar presentations
Introduction to MATLAB
Advertisements

Lecture 6 MATLAB functions Basics of Built-in Functions, Help Feature, Elementary Functions (e.g., Polynomials, Trigonometric Functions), Data Analysis,
Introduction to MATLAB 7 for Engineers
Introduction to Matlab. Entering Commands Constants and Functions >> pi ans = >> eps ans = e-016 >> sin(pi/2) ans = 1 >> log(1000) ans =
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Matrix Mathematics in MATLAB and Excel
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.
Introduction to MATLAB ENGR 1187 MATLAB 1. Programming In The Real World Programming is a powerful tool for solving problems in every day industry settings.
Builtin and user defined functions
EG280 - CS for Engineers Chapter 2, Introduction to C Part I Topics: Program structure Constants and variables Assignment Statements Standard input and.
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Predefined MATLAB Functions ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
MATLAB Tutorials Session I Introduction to MATLAB Rajeev Madazhy Dept of Mechanical Engineering LSU.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
CSE123 Lecture 5 Arrays and Array Operations. Definitions Scalars: Variables that represent single numbers. Note that complex numbers are also scalars,
Introduction to MATLAB Computational Probability and Statistics CIS 2033 Section 003 Djordje Gligorijevic, Temple University, Fall 2015.
MEGN 536 – Computational Biomechanics MATLAB: Getting Started Prof. Anthony J. Petrella Computational Biomechanics Group.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
ENG 1181 College of Engineering Engineering Education Innovation Center MATLAB is a powerful program for numerical computations, plotting and programming.
Introduction to MATLAB ENGR 1181 MATLAB 1. Programming In The Real World Programming is a powerful tool for solving problems in every day industry settings.
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
MATLAB An Introduction to MATLAB (Matrix Laboratory) 1.
Release Numbers MATLAB is updated regularly The Mathworks packages their software in groups, called releases, New releases are issued twice a year in the.
Slide deck by Dr. Greg Reese Miami University MATLAB An Introduction With Applications, 5 th Edition Dr. Amos Gilat The Ohio State University Chapter 1.
Lecture 1 - Introduction June 3, 2002 CVEN 302. Lecture’s Goals General Introduction to CVEN Computer Applications in Engineering and Construction.
1 Functions ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
MATLAB Trigonometry, Complex Numbers and Array Operations.
Introduction to Matlab
Introduction to MATLAB ENGR 1181 MATLAB 1. Opening MATLAB  Students, please open MATLAB now.  CLICK on the shortcut icon → Alternatively, select… start/All.
Visual Basic I Programming
C++ Programming Lecture 9 Functions – Part I By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
(The Transpose Operator) 1 >> C=[ ; ; ] C = >> D=C' D =
ENG 1181 First-Year Engineering Program College of Engineering Engineering Education Innovation Center First-Year Engineering Program MAT - Introduction.
Fundamentals of Programming 20-ENFD-112 Sections 001 to 007 Instructor: Prof. Dieter Schmidt Lecture: Monday, Wednesday 3:00-3:50 Web page
Introduction to Engineering MATLAB – 4 Arrays Agenda Creating arrays of numbers  Vectors: 1-D Arrays  Arrays: 2-D Arrays Array Addressing Strings & String.
MATLAB Lecture 1 염익준. Introduction MATLAB (MATrix LABoratory) a special purpose computer program optimized to perform engineering and scientific calculations.
MATLAB Constants, Variables & Expression Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
BASICS OF MATLAB Engr.Mian Shahzad Iqbal Lecturer,Telecom Department University of Engineering & Technology Taxila.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
1 MATLAB 입문 An Overview of MATLAB. An Overview of MATLAB 2 Starting Matlab The default MATLAB Desktop.
Some “What’s the output” questions to get the day started… >>A = [1 2 3; 3 5 6] This statement stores the matrix: 1. A= 2. A= 3. A= 4. A= Ask Garvin’s.
Basic operations in Matlab EE 201.  Achieve Comprehension LOL of Matlab basic operations. Class Learning Objectives 2.
A Concise Introduction to MATLAB®
Simple C Programs.
Introduction To MATLAB
Introduction to MATLAB
ECE 1304 Introduction to Electrical and Computer Engineering
Arithmetic Operations
ECE 1304 Introduction to Electrical and Computer Engineering
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,
Built-in MATLAB Functions Chapter 3
BIL 104E Introduction to Scientific and Engineering Computing
Computer programming Dr. Ivan A. Hashim.
Computer Simulation Lab
Introduction to Programming
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
INTRODUCTION TO MATLAB AM2032 JAYANTA MUKHERJEE.
Fourth Year – Software Engineering
Communication and Coding Theory Lab(CS491)
Introduction to MATLAB
Introduction to MATLAB
Simulation And Modelling
Announcements P3 due today
CS 111 Introduction to Computing in Engineering and Science
Computer Simulation Lab
MatLab Program Used to Calculate Interactive
Electrical and Computer Engineering Department SUNY – New Paltz
Presentation transcript:

ECE 1304 Introduction to Electrical and Computer Engineering Section 1.4 Operators and Functions 1

Commands and Operators Description clc Clears the Command Window clear Clears all variables from memory clear var1 Clears var1 from memory exist(‘name’) Determines if a file or variable exists with the name ‘name’. quit Stops MATLAB who Lists the variables currently in memory whos Lists the variables currently in memory and indicates their size and if they are complex

Commands and Operators Description + Plus; addition operator - Minus, subtraction operation * Scalar and matrix multiplication operator .* Array (point-by-point) multiplication operator ^ Scalar and matrix exponentiation operator .^ Array (point-by-point) exponentiation operator \ Left division operator / Right division operator .\ Array (point-by-point) Left division operator ./ Array (point-by-point) Right division operator : Colon; generates regularly spaced elements () Parentheses; encloses function arguments and array indices; overrides precedence

Commands and Operators Description [] Brackets; encloses array elements {} Braces; encloses cell elements . Decimal point ... Ellipsis; continues a line , Comma; separates elements in an array ; Semicolon; suppresses screen printing, denotes a new row in an array % Percent sign; designates a comment and specifies formatting ' Quote sign and transpose operator .' Nonconjugated transpose operator = Assignment operator

Special Variables and Constants Symbol Description ans Temporary variable containing the most recent answer. eps Accuracy of floating point calculations i, j Imaginary unit value; sqrt(-1) Inf Infinity NaN Not a number; occurs when an operation is undefined pi The number 3.14159…

Mathematical Functions exp(x) – Exponentiation

Mathematical Functions sqrt(x) – Square Root

Mathematical Functions log(x) – Natural Logarithm

Mathematical Functions log10(x) – Base 10 Logarithm

Mathematical Functions abs(x) – Absolute Value

Mathematical Functions angle(x) – Phase Angle

Mathematical Functions conj(x) – Complex Conjugate

Mathematical Functions imag(x) – Imaginary Part

Mathematical Functions real(x) – Real Part

Mathematical Functions ceil(x) – Round toward + Inifinity

Mathematical Functions fix(x) – Round toward Zero

Mathematical Functions floor(x) – Round toward Negative Infinity

Mathematical Functions round(x) – Round to nearest integer

Mathematical Functions sign(x) – Return algebraic sign

Trigonometric Functions All angles must be in radians angle_in_Radians = angle_in_Degrees*pi/180 cos(x) sec(x) sin(x) csc(x) tan(x) cot(x)

Inverse Trigonometric Functions All angles are returned in radians acos(x) asec(x) asin(x) acsc(x) atan(x) acot(x) atan2(y,x) Four quadrant inverse tangent. x and y are the coordinates of a point.

Trigonometric Functions All angles must be in degrees angle_in_Degrees = angle_in_Radians*180/pi cosd(x) secd(x) sind(x) cscd(x) tand(x) cotd(x)

Inverse Trigonometric Functions All angles are returned in degrees acosd(x) asecd(x) asind(x) acscd(x) atand(x) acotd(x) atan2d(y,x) Four quadrant inverse tangent. x and y are the coordinates of a point.