MATLAB Lecture One Monday 4 July 2005. Matlab Melvyn Sim Department of Decision Sciences NUS Business School

Slides:



Advertisements
Similar presentations
MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
Advertisements

Introduction to M ATLAB Programming Ian Brooks Institute for Climate & Atmospheric Science School of Earth & Environment
Introduction to Matlab
Matlab Programming Huajun Wang Department of Earth Sciences, Zhejiang University Jan 25,2012.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
M AT L AB Programming: scripts & functions. Scripts It is possible to achieve a lot simply by executing one command at a time on the command line (even.
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
MATLAB – What is it? Computing environment / programming language Tool for manipulating matrices Many applications, you just need to get some numbers in.
Introduction to Matlab By: Dr. Maher O. EL-Ghossain.
Introduction to MATLAB
Computer Science in Practice This course is an introduction to problems (and solutions) that arise in applied fields of computer science such as machine.
Introduction to MATLAB Week 13 – 4/21/09. Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 18P. 1Winter Quarter Introduction to MATLAB.
Introduction to MATLAB Northeastern University: College of Computer and Information Science Co-op Preparation University (CPU) 10/22/2003.
What is MATLAB ? MATrix LABratory –Originally, it was a front-end to FORTRAN matrix routines developed in the U. of New Mexico and Stanford –Today.
January 24, 2005 Lecture 3 - By P. Lin 1 CPET 190 Lecture 3 Problem Solving with MATLAB
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 Second Seminar. Previous lesson Last lesson We learnt how to: Interact with MATLAB in the MATLAB command window by typing commands at the command.
FOR 520: Geospatial data analysis with Matlab
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.
You can make this in matlab!. Matlab Introduction and Matrices.
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
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.
ELG 3120 Signal and System Analysis 1 Introduction to MATLAB TAs Wei Zhang Ozgur Ekici (Section A)(Section B) ELG 3120 Lab Tutorial 1.
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 ,
Eng Ship Structures 1 Introduction to Matlab.
INTRODUCTION TO MATLAB LAB# 01
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Matlab Basics Tutorial. Vectors Let's start off by creating something simple, like a vector. Enter each element of the vector (separated by a space) between.
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.
Basics of MATLAB By DR. Wafaa Shabana
MATLAB Environment ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Introduction to MATLAB Session 1 Simopekka Vänskä, THL 2010.
Introduction to MATLAB. CSPP58001 MATLAB MATLAB is is a matrix-based language well suited for carrying out numerical analysis. It has many, many high-
OUTLINE Overview Numbers, variables and similar in Matlab
Introduction to Matlab. Outline:  What is Matlab? Matlab Screen Variables, array, matrix, indexing Operators (Arithmetic, relational, logical ) Display.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 18P. 1Winter Quarter Introduction to MATLAB Lecture 18.
Introduction to Matlab. What is Matlab? A software environment for interactive numerical computations Examples:  Matrix computations and linear algebra.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
Matlab Basic. MATLAB Product Family 2 3 Entering & Quitting MATLAB To enter MATLAB double click on the MATLAB icon. To Leave MATLAB Simply type quit.
The Hong Kong Polytechnic University Industrial Centre MatLAB Lesson 1 : Overview & Environment Edward Cheung Room W311g.
訊號與系統 廖文淵 德霖技術學院資訊工程系 Introduction to MATLAB.
1 Lecture 4 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
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
An Introduction to Programming in Matlab Emily Blumenthal
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 Programming for Engineers
Introduction to Matlab
Introduction to MATLAB
Introduction to Matlab
Lecture: MATLAB Chapter 1 Introduction
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
StatLab Matlab Workshop
Part I – Matlab Basics.
Use of Mathematics using Technology (Maltlab)
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Matlab Basic Dr. Imtiaz Hussain
Presentation transcript:

MATLAB Lecture One Monday 4 July 2005

Matlab Melvyn Sim Department of Decision Sciences NUS Business School

References l “Getting Started with Matlab,” by Rudra Pratap l “Matlab manual” by the MathWorks Inc.

Chapter 1

What is MATLAB l An interactive numerical computing environment l Matrix computations l Graphics l Programming (M-files) l Toolboxes (signal processing, statistics, optimization, symbolic math)

Advantage of MATLAB l Easy, interactive environment l Fast numerical algorithms l Inexpensive software l Fun and easy environment for learning Linear Algebra!!

Think Linear Algebra!! l More important and calculus!! l Background Knowledge Given two matrices, A and B, is AB = BA? A and B are symmetric Matrices, is AB symmetric? What is positive definite matrix? What is Eigenvalue decomposition?

Windows Environment MATLAB is essentially operating system independent

Input/Output l MATLAB handles double, char and logical data types l Array need not dimensioned l Variables are case sensitive l Output format can be controlled l Command history remembered

Files MATLAB Handle l M-files (*.m) are script and function files l Mat-files (*.mat) are created by MATLAB with save, and read with load l Mex-files (*.mex) MATLAB callable codes compiled from other languages

General Commands l On-line helps (help, helpwin, helpdesk, lookfor, demo) l Workspace (who, whos, what, clear, clc, clf) l Directory (pwd, cd, dir, ls, path) l General (computer, clock, date, more, ver) l Termination (^c, quit, exit)

Chapter 2

Tutorial Lessons

Lesson 1 l Assign values to variables l Basic arithmetic (+,-, *, /, ^) l Suppress screen output by ; l Float-point number appearance l Function sin, cos, log l Quit

Lesson 2 l Create row and column vectors l Linearly spaced vectors l Arithmetic on vectors l Array operations with.*,./,.^ l Math functions on vectors

Lesson 3: Creating and Printing Plot l Create points l 2D plots l Printing

Lesson 4: Script file l Create, write, save a script file l How to execute the script file l path, and addpath command l pwd and cd command

Lesson 5: Creating a function l Function file l Executing a function

Exercises l Lesson 3, exercise 3. An exponentially decaying sine plot: Plot y = exp(-0.4x) sin x, 0<x<4 

Exercises l Lesson 5, exercise 2. Convert temperature: write a function that outputs a conversion table from Celsius and Fahrenheit temperatures. The two temperatures are related as F = (9/5) C + 32

Exercises l Best way to skin a cat!! l Given a vector x Find the sum Find the sum of squares

Exercise l Monte Carlo Sampling Generate N samples of the sum of M independent uniformly distributed random variables.

Histogram Plot