Engineering Computation using MATLAB

Slides:



Advertisements
Similar presentations
Introduction to MATLAB The language of Technical Computing.
Advertisements

Introduction to MATLAB Northeastern University: College of Computer and Information Science Co-op Preparation University (CPU) 10/20/2003.
MATLAB Presented By: Nathalie Tacconi Presented By: Nathalie Tacconi Originally Prepared By: Sheridan Saint-Michel Originally Prepared By: Sheridan Saint-Michel.
EGR 106 – Week 2 – Arrays & Scripts Brief review of last week Arrays: – Concept – Construction – Addressing Scripts and the editor Audio arrays Textbook.
Introduction to MATLAB Northeastern University: College of Computer and Information Science Co-op Preparation University (CPU) 10/22/2003.
Introduction to Matlab Jianguo Wang CSSCR September 2009.
Digital Image Processing Lecture3: Introduction to MATLAB.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
© 2004 The MathWorks, Inc. 1 MATLAB for C/C++ Programmers Support your C/C++ development using MATLAB’s prebuilt graphics functions and trusted numerics.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Introduction to MATLAB Session 1 Prepared By: Dina El Kholy Ahmed Dalal Statistics Course – Biomedical Department -year 3.
Introduction to M ATLAB EE 100 – EE Dept. - JUST.
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.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
A L I MAM M OHAMMAD B IN S AUD I SLAMIC U NIVERSITY C OLLEGE OF S CIENCES D EPARTMENT OF M ATHEMATICS MATLAB 251 : MATH SOFTWARE Introduction to MATLAB.
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.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Computational Physics Introduction 3/30/11. Goals  Calculate solutions to physics problems  All physics problems can be formulated mathematically. 
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Matlab for Engineers About Matlab Chapter 1. Matlab for Engineers What’s in this Chapter? What is Matlab? Student Edition of Matlab How is Matlab used.
About MATLAB® Chapter 1 Welcome to Chapter 1 of MATLAB for Engineers. In this chapter we’ll introduce you to the MATLAB computer software program.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
CMPS 1371 Introduction to Computing for Engineers MatLab.
Basics of MATLAB By DR. Wafaa Shabana
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 1: Brief Overview of MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
EGR 115 Introduction to Computing for Engineers Introduction to Computer Programming Wednesday 27 Aug 2014 EGR 115 Introduction to Computing for Engineers.
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
Introduction to MATLAB Northeastern University: College of Computer and Information Science Co-op Preparation University (CPU) 10/20/2003.
The Hong Kong Polytechnic University Industrial Centre MatLAB Lesson 1 : Overview & Environment Edward Cheung Room W311g.
CIS 601 Fall 2003 Introduction to MATLAB Longin Jan Latecki Based on the lectures of Rolf Lakaemper and David Young.
Introduction to Matlab Patrice Koehl Department of Biological Sciences National University of Singapore
M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.
Simulink by Dr. Amin Danial Asham. References  MATLAB Help  Telemark University College - Department of Electrical Engineering, Information Technology.
Matlab for Engineers Matlab Environment Chapter 2.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
CIS 595 MATLAB First Impressions. MATLAB This introduction will give Some basic ideas Main advantages and drawbacks compared to other languages.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.
Matlab Programming for Engineers
Matlab.
Release Numbers MATLAB is updated regularly
Computer Application in Engineering Design
About MATLAB® Chapter 1 Welcome to Chapter 1 of MATLAB for Engineers. In this chapter we’ll introduce you to the MATLAB computer software program.
Lecture: MATLAB Chapter 1 Introduction
Software for scientific calculations
MatLab Programming By Kishan Kathiriya.
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
Objectives of the Presentation
Welcome to MATLAB.
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Introduction to MATLAB
Lecture 1: Introduction
Use of Mathematics using Technology (Maltlab)
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
Digital Image Processing
Introduction to MATLAB
CSE 307 Basics of Image Processing
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Experiment No. (1) - an introduction to MATLAB
Introduction To MATLAB
Presentation transcript:

Engineering Computation using MATLAB Welcome to Chapter 1 of Matlab for Engineers. In this chapter we’ll introduce you to the Matlab computer software program Dr Simin Nasseri, Mechanical Engineering Technology Department, Southern Polytechnic State University

Matlab MATLAB stands for Matrix Laboratory Developed primarily by Cleve Moler in the 1970's MATLAB was originally written in Fortran, then later rewritten in C. Derived from FORTRAN subroutines LINPACK and EISPACK, linear and eigenvalue systems. Rewritten in C in the 1980's with more functionality, which include plotting routines.

Matlab MATLAB is one of a number of commercially available, sophisticated mathematical computation tools Others include Maple Mathematica (MATLAB's competitor = the symbolic computation program) MathCad MATLAB is more convenient for numerical analysis and linear algebra. It is frequently used in engineering community. Mathematica has superior symbolic manipulation, making it popular among physicists. We’ll take a look at what the software can do, introduce the student edition of Matlab, and we’ll look at some examples of how Matlab is used in industry. Finally, we’ll introduce a problem solving strategy that is commonly used in science and engineering.

Why Matlab?! MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming environment. MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-in editing and debugging tools, and supports object-oriented programming. These factors make MATLAB an excellent tool for teaching and research.

Why Matlab?! MATLAB is widely used. MATLAB is easy to use. MATLAB is interpreted (not compiled), errors are easy to fix. MATLAB is optimized to be relatively fast when performing matrix operations.

Why Matlab?! A systematic problem solving strategy makes it more likely you’ve found the right answer. Built in programming language (Matlab is a package + a language). Not a general purpose language like C++ or Java. Matlab Excels at Numerical calculations (Especially involving matrices) and Graphics.

Weaknesses MATLAB is not a general purpose programming language such as C, C++, or FORTRAN. MATLAB is designed for scientific computing, and is not well suitable for other applications. MATLAB commands are specific for MATLAB usage. Most of them do not have a direct equivalent with other programming language commands.

Summary MATLAB® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran. Introduction and Key Features Developing Algorithms and Applications Analyzing and Accessing Data Visualizing Data Performing Numeric Computation Publishing Results and Deploying Applications

Matlab 2010 The MathWorks Inc. was created (1984) to market and continue development of MATLAB. MATLAB is updated regularly. The Mathworks packages their software in groups, called releases. Each one contains: MATLAB Simulink A number of specialized “toolboxes” 1. Matlab is published by a company call the Mathworks. Their software is usually packaged in groups, called releases. 2. This text refers to release 14, which includes Matlab 7, Simulink – which is a companion program used to model dynamic systems - and a number of specialized toolboxes. Toolboxes are groups of functions unique to certain industries or tasks. For example there is a data analysis toolbox with expanded capability past what ships with a standard Matlab installation. These toolboxes are sold separately.

New Release Naming System They will be issuing updates twice a year R2010a R2010b MATLAB comes in both a student and professional edition. Student editions are available for: Windows Operating Systems Mac OS Linux

How is MATLAB used in Industry? Widespread, especially in the signal processing field Tool of choice in Academia for most engineering fields Some examples…. Matlab is widely used both in industry and in academia. It has found particularly wide acceptance in the signal processing field, and so is very common in Electrical engineering departments in colleges and universities. However, in the last several years it has been steadily replacing general purpose programming languages in all the engineering disciplines.

Electrical Engineering These images simulate the visual system used in a housefly brain to detect collisions. The techniques developed are being used in autonomous robot systems that depend upon vision for navigation. The data was processed using MATLAB. For example, a project currently underway at the University of Utah Department of Electrical Engineering is using information from a video camera to simulate the visual system used in a housefly brain to detect collisions. The data is processed using Matlab, then used in an autonomous robot system that depends on vision for navigation. The image on the left is the unprocessed data from the video camera – the two pictures on the right have been processed using Matlab. Potential uses for this technology include both collision warning and eventually autopilot systems for cars.

Biomedical Engineering Matlab is also being used in the medical field. These images were created from MRI data, using Matlab. The actual data set is included with the standard Matlab installation, allowing you experiment with manipulating the data yourself. These images were created from MRI scan data using MATLAB. The actual data set is included with the standard MATLAB installation, allowing you experiment with manipulating the data yourself.

Statics and Structures The motion of an idealised two span bridge under the action of a moving point force across its surface, when the force velocity is equal to the first critical speed. The animation was created in matlab, using the analytical equations of motion derived in "Vibration of solids and structures under moving loads" Fryba, L, 1999

Dynamics Click and watch

Robotics Click and watch In this Cartesian Motion we have fixed the TCP (Tool Center Point) in space at pos=(430,0,750). This simulation was made with Matlab R12. Click and watch

Fluid Dynamics Computational fluid dynamics is an area that is especially well suited to formulating problems as matrices. This particular image is the result of a finite element analysis. A gas generator, in the lower left corner of the model creates high temperature and pressure gas, which travels thru a curved pipe shown near the center of the model, and into a “plenum” – which is just a fancy word for a gas holding tank. The arrows represent both the direction in which the gas is traveling, and the velocity of the gas. This is actually a three dimensional image, which could be rotated in Matlab and viewed from any angle. Results from a finite element analysis code were post processed using MATLAB to create this image.

3D Plotting and Volume Visualization A 3-D isosurface plot revealing the geodesic dome structure of a carbon-60 or “fullerene” molecule (molecules composed entirely of carbon).

Widely used in Academia eg. University of Colorado:

Why @ MET?!

Working with Matlab We’ll start learning the details of how to use MATLAB now: In Windows or Apple operating systems click on the desktop icon In Unix type: MATLAB at the shell prompt. MATLAB opens to a default window configuration: Of course, at this point we haven’t learned how to use Matlab, however you can see from the following demonstration just how easy it is to use the command window.

MATLAB uses a standard windows menu bar

There are 7 windows. Lets see what they are. MATLAB Windows MATLAB uses several different windows to display data, commands and results. There are 7 windows. Lets see what they are. Here you see the Matlab desktop. In the command window we first define a variable called E that represents the amount of energy used in one day. Notice that Matlab uses a syntax similar to that used on your calculator for scientific notation. Now we need to change the value of E to J/day, by multiplying by the appropriate conversion factors – 3600 for seconds to hours and 24 for hours to days Next we define a variable c to represent the speed of light. Finally we can combine these variables and solve for the mass. As you can see, we calculate that mass is equal to 3.7 times 10 to the 14th kg.

1- Command Window 4- Current Directory 2- Command History Enter commands at the prompt 4- Current Directory 2- Command History 3- Workspace Window

You can use the command window much like you’d use a calculator Enter commands at the prompt You can use the command window much like you’d use a calculator The standard order of operation rules apply

1- Command Window 1- Command Window Enter commands at the prompt Similar to a scratch pad Once you hit enter, you can’t edit any commands You can retype them or use the arrow keys to retrieve commands and edit them before hitting enter again

2- Command History 2- Command History You can transfer commands from the command history to the command window Double click on a command Click and drag

2- Command History 2- Command History Records the commands you issue in the command window When you exit the command window, or when you issue the clc command, the command window is cleared But the command history remains

3- Workspace Window 3-Workspace Window Variables that you introduce are written here.

Scalar Vector 2-D Matrix Keeps track of the variables you’ve defined (Name, Value, Size, Bytes, Class) You may need to click on the name bar and select size and bytes in order to see these parameters

4- Current Directory window

4- Current Directory Window The current directory window is a list of files. When you try to load information from a file or try to save information – MATLAB uses the current directory.

5- Document Window If you double click on any variable in the workspace window MATLAB launches a document window containing the array editor. You can edit variables in the array editor.

5- Document Window

6- Figure Window When Figures are created a new window opens. It’s extremely easy to create graphs in MATLAB.

Plotting x versus y.

6- Figure Window

7- Editing Window This window allows you to type and save a series of commands without executing them. There are several ways to open an editing window: From the file menu With the new file icon

Open an editing window from the file menu or with the new file icon

Save and Run Write your code in the editing window, then run it using the Save and Run icon