Matlab Programming for Engineers

Slides:



Advertisements
Similar presentations
Matlab Programming Huajun Wang Department of Earth Sciences, Zhejiang University Jan 25,2012.
Advertisements

Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Engineering Computation using MATLAB
ECEN/MAE 3723 – Systems I MATLAB Lecture 1. Lecture Overview  Introduction and History  Matlab architecture  Operation basics  Visualization  Programming.
Introduction to Matlab. I use Matlab for: Data analysis Data plotting Image Analysis Also – Simulations (solving odes/pdes/finite element methods) – Minimisations,
Intro MATLAB: Special Purpose Computer Program Optimized to perform engineering and scientific calculations Implements the MATLAB programming language.
Introduction to MATLAB Week 13 – 4/21/09. Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm
ES 100: Introduction to Engineering Use of the Computer 1.Log in using your Novell password. If you do not know your password, immediately (now!) see Al.
Introduction to MATLAB
ME457 Mechatronic System Modeling MICHIGAN STATE UNIVERSITY Matlab® refresher Your objective: to dominate! My objective: to help you dominate!
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.
Introduction to programming in MATLAB MATLAB can be thought of as an super-powerful graphing calculator Remember the TI-83 from calculus? With many more.
Digital Image Processing Lecture3: Introduction to MATLAB.
January 24, 2005 Lecture 3 - By P. Lin 1 CPET 190 Lecture 3 Problem Solving with MATLAB
MATLAB and SimulinkLecture 11 To days Outline  Introduction  MATLAB Desktop  Basic Features  Branching Statements  Loops  Script file / Commando.
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
Nonparametric Econometrics1 Intro to Matlab for Data Analysis and Statistical Modeling.
Introduction to Matlab 1. Outline: What is Matlab? Matlab Screen Variables, array, matrix, indexing Operators Plotting Flow Control Using of M-File Writing.
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.
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)
Matlab Programming for Engineers Dr. Nidal Farhat Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
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.
Matlab Programming for Engineers Dr. Bashir NOURI Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
MATLAB Practice 1 Introducing MATLAB Lecture Notes on Video Search & Mining, Spring 2012 Presented by Jun Hee Yoo Biointelligence Laboratory School of.
CMPS 1371 Introduction to Computing for Engineers MatLab.
Basics of MATLAB By DR. Wafaa Shabana
MATLAB Environment ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Winter Semester 2014/2015 College of Engineering.
OUTLINE Overview Numbers, variables and similar in Matlab
EGR 115 Introduction to Computing for Engineers Introduction to MATLAB Friday 29 August 2014 EGR 115 Introduction to Computing for Engineers.
EGR 115 Introduction to Computing for Engineers Introduction to Computer Programming Wednesday 27 Aug 2014 EGR 115 Introduction to Computing for Engineers.
Matlab Programming for Engineers
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
Introduction to Matlab Engr. Mian Shahzad Iqbal LAB NO.2
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.
MATLAB The name of MATLAB stands for matrix laboratory. Starting a MATLAB Session -On Microsoft® Windows® platforms, start the MATLAB program by double-clicking.
Introduction to MATLAB
Release Numbers MATLAB is updated regularly
Introduction to Matlab
Lecture: MATLAB Chapter 1 Introduction
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Welcome to MATLAB.
2) Platform independent 3) Predefined functions
MATLAB(Matrix Laboratory). Introduction Developed by MathWorks Numerical Computing Environment Fourth-generation Programming Language.
Introduction to MATLAB
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
StatLab Matlab Workshop
Use of Mathematics using Technology (Maltlab)
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
MATLAB Tutorial Dr. David W. Graham.
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Lecture 2 Introduction to MATLAB
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
Digital Image Processing
CSE 307 Basics of Image Processing
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Matlab Basic Dr. Imtiaz Hussain
Experiment No. (1) - an introduction to MATLAB
Your objective: to dominate! My objective: to help you dominate!
Introduction To MATLAB
Presentation transcript:

Matlab Programming for Engineers Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data Types Input/Output Functions Simulink Toolbox Important Toolboxes (if time is available) Dr. Bashir Nouri

The Advantages of Matlab Disadvantages of Matlab Objectives: The Advantages of Matlab Disadvantages of Matlab The Matlab Environment Using Matlab as a scratch Pad

Advantages and Disadvantages of Matlab Matlab == MATrix LABoratory Advantages: Ease of Use Platform Independent (All versions of Windows, Linux, Unix, Mac.) Predefined Functions and Toolboxes Device-Independent Plotting Graphical User Interface Matlab compiler Disadvantages: Interpreted programming language, slower than C++ and V. Fortran.

The Matlab Environment Matlab Command Window User input area Also results appear in this window Current directory browser Command history

The Matlab Environment

The Matlab Environment Script files / M-files

The Matlab Environment The Edit/Debug Window

The Matlab Environment

The Matlab Environment (Figure Windows)

The Matlab Environment (Figure Windows)

The Matlab Environment (Workspace) whos Display the value of any variable in the WS clear var1 var2 Double-click any var in the WS browser

The Matlab Environment (Workspace)

The Matlab Environment (Getting Help)

The Matlab Environment (Getting Help)

The Matlab Environment (Getting Help) lookfor: Search the quick summery information in each file

The Matlab Environment (Getting Help) help: Search function name

The Matlab Environment (Getting Help)

The Matlab Environment A few important commands clc: clears command window clf: clears current figure clear: clear variables in the WS Ctrl+c: aborts the execution of the program exit: exits Matlab !(command): runs the command in the operating system (ex. dir, copy …) save/load (WS): saves and loads the WS

If a command (name) is executed Matlab seeks for: The Matlab Search Path If a command (name) is executed Matlab seeks for: A variable with the same name in the current WS. M-file in the same directory M-file in the any directory in the search path Sequence is important

MATLAB Math & Assignment Operators Power: (^) or (.^)  a^b or   a.^b Multiplication: (*) or (.*)  a*b  or  a.*b Division: (/)  or  (./)  a/b  or  a./b    or  (\)  or (.\)  b\a  or  b.\a NOTE:         56/8 = 8\56 Addition: (+)      a + b Subtraction:  (-)        a – b Assignment:  (=)    a = b     (assign b to a)

HW1 The distance traveled by a ball falling in the air is given by the equation Use the Matlab to plot the path of the ball (y) as a function of time from t=0s to t=5s, if