MATLAB Environment ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.

Slides:



Advertisements
Similar presentations
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Advertisements

Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
MATLAB ME1107 Y Yan Reference: MATLAB for Engineers by Holly Moore (Pearson Prentice Hall)
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
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.
1 MATLAB 基礎. 2 MATLAB  Workspace: environment (address space) where all variables reside  After carrying out a calculation, MATLAB assigns the result.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
259 Lecture 15 Introduction to MATLAB. 2 What is MATLAB?  MATLAB, which stands for “MATrix LABoratory” is a high- performance language for technical.
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Nonparametric Econometrics1 Intro to Matlab for Data Analysis and Statistical Modeling.
Introduction to MATLAB Session 1 Prepared By: Dina El Kholy Ahmed Dalal Statistics Course – Biomedical Department -year 3.
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
IC3003 B ASIC S CIENTIFIC C OMPUTING Lecture 1 Monday 08:30-11:30 U204a.
1 Lab of COMP 406 Teaching Assistant: Pei-Yuan Zhou Contact: Lab 1: 12 Sep., 2014 Introduction of Matlab (I)
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
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.
A Brief Introduction to Matlab Laila Guessous Dept. of Mechanical Engineering Oakland University.
MATLAB An Introduction to MATLAB (Matrix Laboratory) 1.
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Matlab Programming for Engineers Dr. Bashir NOURI Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
1 Yangon Technological University Department of Mechanical Engineering Computer Application In Mechanical Engineering I ME Dr. Yin Yin Tun Deputy.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Lecture 2 - Matlab Introduction CVEN 302 June 5, 2002.
Winter Semester 2014/2015 College of Engineering.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ME6104: CAD. Module 4. ME6104: CAD. Module 4. Systems Realization Laboratory Module 4 Matlab ME 6104 – Fundamentals of Computer-Aided Design.
Chapter 1 – Matlab Overview EGR1302. Desktop Command window Current Directory window Command History window Tabs to toggle between Current Directory &
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
Introduction to MATLAB 7 MATLAB Programming for Engineer Hassan Migdadi Spring 2013.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
1 Lecture 1 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
Computing Systems & Programming ECE Fundamental Concepts Chapter 1 Engineering Problem Solving.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2012.
Introduction ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
1 Lecture 4 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Introduction to Matlab Patrice Koehl Department of Biological Sciences National University of Singapore
Matlab for Engineers Matlab Environment Chapter 2.
CMPS 1371 Introduction to Computing for Engineers VECTORS.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
Interduction to MATLAB (part 2) Manal Alotaibi Mathematics department College of science King saud university.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
“Moh’d Sami” AshhabSummer 2008University of Jordan MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
Plotting ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Matlab Programming for Engineers
ECE 1304 Introduction to Electrical and Computer Engineering
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
2) Platform independent 3) Predefined functions
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
Use of Mathematics using Technology (Maltlab)
funCTIONs and Data Import/Export
Chapter 2 MATLAB Environment
Presentation transcript:

MATLAB Environment ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne

206_M22 Course Outline  MATLAB IntroCh 1 MATLAB EnvironmentCh 2 Predefined FunctionsCh 3 PlottingCh 4 ProgrammingCh 5 Control StructuresCh 5 Matrix ComputationsCh 6 Test #3 Test #4

206_M23 Computer Software  Operating System Interface between user and hardware  Application Software Word Processors, Spreadsheets, Databases,... Computer-aided Design (CAD) Mathematical Computation Tools (MATLAB)  Computer Languages Machine Language Assembly Language High-level Languages (C++)

206_M24 Problem-Solving  An Engineering Problem-Solving Methodology Problem Statement Input/Output Description Hand Example Algorithm Development Testing

206_M25 Example  Temperature Analysis Problem Statement Compute the average of a set of temperatures, then plot the time and temperature values. Input/Output Description Time Values Temperature Values Average Temperature Plot of Time and Temperature Values

206_M26 Example Hand Example Average = ( )/3 = Degrees F Algorithm Development (outline) Input times and temperatures Compute average Plot times and temperatures Time (Minutes)Temperature (Degrees F)

206_M27 Example MATLAB Solution % Compute average temperature and % plot the temperature data. % time = [0.0, 0.5, 1.0]; temps = [105, 126, 119]; average = mean(temps) plot(time, temps), title('Temperature Measurements'), xlabel('Time, minutes'), ylabel('Temperature, degrees F'), grid

206_M28 Example Testing

206_M29 Example

206_M210 Example Testing time = [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0,... 3,5, 4.0, 4.5, 5.0]; temps = [105, 126, 119, 129, 132, 128, 131, , 136, 132, 137];

206_M211 Example

206_M212 MATLAB Windows

206_M213 MATLAB Windows  Current Directory Window  Command Window  Command History  Workspace Window  Document Window Array Editor  Graphics Window  Editor Window  Start Button

206_M214 Scalar Operations Exponentiation ^ Multiplication * Division / Addition + Subtraction - Precedence 2 3 4

206_M215 Expressions num = x^3 - 2*x^2 + x - 6.3; den = x^ *x ; f = num/den;

206_M216 Arrays, Vectors and Matrices  Row Vector X = [ ]; (1x4)  Column Vector Y = [1; 2; 3; 4]; (4x1) Y = [ ]'; transpose operator  Matrix A = [1 2; 3 4; 5 6]; (3x2)  Evenly Spaced Matrices B = [1:5]; C = [1:2:5]; D = linspace(1,10,3);

206_M217 Array Operations  Arrays with Scalars Same  Arrays with Arrays Same for Addition and Subtraction  Element-by-Element Operations Exponentiation.^ Multiplication.* Division./

206_M218 Number Display  Scientific Notation LightSpeed = e08;  Display Format format long format long e format short format short e format bank format +

206_M219 Saving Your Work  Saving Variables Save the contents of the Workspace Window to a file Default format binary.mat save load ASCII (text).dat save -ascii load  Script M-Files ASCII (text).m MATLAB Editor Window % This is a comment

206_M220 Problem Solving Applied  UDF Engine Performance Problem Statement Calculate the velocity and acceleration using a script M-file Input/Output Description Velocity Start Time = 0 sec Acceleration Final Time = 120 sec Time Increment = 10 sec

206_M221 Problem Solving Applied Hand Example velocity = time time time acceleration = velocity 2 For time = 100 sec  velocity = m/sec  acceleration = m/sec 2 Algorithm Development (outline) Define time matrix Calculate velocity and acceleration Output results in table

206_M222 MATLAB Solution clear, clc %Example 2.4 %These commands generate velocity and acceleration %values for a UDF aircraft test %Define the time matrix time = 0:10:120; %Calculate the velocity matrix velocity = *time.^ *time.^ *time ; %Use calculated velocities to find the acceleration acceleration = e-5*velocity.^2; %Present the results in a table [time', velocity', acceleration']

206_M223 Testing

206_M224 Summary  MATLAB Environment  Scalar Operations  Array Operations  Saving Your Work  End of Chapter Summary MATLAB Summary Characters, Commands and Functions Key Terms