Introduction to MATLAB Week 13 – 4/21/09. Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm

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

Matlab Programming Huajun Wang Department of Earth Sciences, Zhejiang University Jan 25,2012.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
MATLAB – What is it? Computing environment / programming language Tool for manipulating matrices Many applications, you just need to get some numbers in.
 Statistics package  Graphics package  Programming language  Can be used to share/reproduce analyses  Many new packages being created - can be downloaded.
Welcome to EGR 106 Foundations of Engineering II Course information Today’s specific topics: – Computation and algorithms – M ATLAB Basics Demonstrations.
Graphics in MATLAB Week 15 – 5/5/09 Kate Musgrave
MATLAB Extras Week 16 – 5/12/09 Kate Musgrave
Introduction to MATLAB 3 November Instructor: Andy Newman Office Hours: Stop by room 306 (main building) whenever
Introduction to MATLAB Northeastern University: College of Computer and Information Science Co-op Preparation University (CPU) 10/22/2003.
Division Example 2x - 3y + 4z = 10 x + 6y - 3z = 4 -5x + y + 2z = 3 A*X = B where A = B = >> X = A\B X =
Programming in MATLAB Week 14 – 4/28/09 Kate Musgrave
Introduction to MATLAB
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.
Digital Image Processing Lecture3: Introduction to MATLAB.
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.
THE MATLAB ENVIRONMENT VARIABLES BASIC COMMANDS HELP HP 100 – MATLAB Wednesday, 8/27/2014
Introduction to MATLAB
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (2): MATLAB Environment (Chapter 1)
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
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)
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.
MATLAB An Introduction to MATLAB (Matrix Laboratory) 1.
Piotr Wolski Introduction to R. Topics What is R? Sample session How to install R? Minimum you have to know to work in R Data objects in R and how to.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Lecture 1 - Introduction June 3, 2002 CVEN 302. Lecture’s Goals General Introduction to CVEN Computer Applications in Engineering and Construction.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Intro to Matlab 1.Using scalar variables 2.Vectors, matrices, and arithmetic 3.Plotting 4.Solving Systems of Equations Can be found at:
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
26 - 3/20/2000AME 150L1 M ATLAB ® /20/2000AME 150L2 M ATLAB ® vs. Fortran Fortran Positives –First Compiler –Legacy Codes –Efficient Numerically.
Introduction to Engineering MATLAB – 2 Introduction to MATLAB - 2 Agenda Defining Variables MATLAB Windows.
CMPS 1371 Introduction to Computing for Engineers MatLab.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Basics of MATLAB By DR. Wafaa Shabana
MATLAB Technical Computing Environment. MATLAB Matlab is an interactive computing environment that enables numerical computation and data visualization.
Introduction to MATLAB Session 1 Simopekka Vänskä, THL 2010.
ME6104: CAD. Module 4. ME6104: CAD. Module 4. Systems Realization Laboratory Module 4 Matlab ME 6104 – Fundamentals of Computer-Aided Design.
Matlab. Textbooks Required:, by Palm (3 rd edition) Required: Introduction to MATLAB for Engineers, by Palm (3 rd edition)
Engineering Analysis – Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
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.
Interduction to MATLAB Manal Alotaibi Mathematics department College of science King saud university.
Introduction to Matlab Electromagnetic Theory LAB by Engr. Mian Shahzad Iqbal.
訊號與系統 廖文淵 德霖技術學院資訊工程系 Introduction to MATLAB.
Introduction to Matlab Patrice Koehl Department of Biological Sciences National University of Singapore
CSE123 Introduction to Computing Lecture 2 Introduction to MATLAB.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
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 실험 - Matlab 사용법 - Photonic Systems Laboratory School of EE, Seoul National University Photonic Systems Lab School of EECS, S.N.U.
Matlab Programming for Engineers
Introduction to MATLAB
Introduction to Matlab
Matlab Training Session 4: Control, Flow and Functions
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.
StatLab Matlab Workshop
Use of Mathematics using Technology (Maltlab)
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Digital Image Processing
Experiment No. (1) - an introduction to MATLAB
MATLAB Introduction MATLAB can be thought of as a powerful graphing calculator but with a lot more buttons! It is also a programming language, commands.
Introduction to Matlab
Presentation transcript:

Introduction to MATLAB Week 13 – 4/21/09

Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm Website: programming/ programming/

Syllabus Week 13: T 4/21 –Intro to MATLAB –MATLAB GUI –Variables –Operations Week 14: T 4/28 –Functions and scripts –Programming style –Comments –Flow control –File I/O Week 15: T 5/5 –Graphics –Plot types –Figure window –Figure properties –Figures: special topics Week 16: T 5/12 –MATLAB toolboxes –Statistics –Signal processing –Special topics

What is MATLAB? MATLAB stands for MATrix LABoratory As such, it is optimized for matrix manipulation MATLAB is useful for visualization and data analysis MATLAB is versatile, designed to work the same across platforms and to interface with multiple programming languages MATLAB is expandable with toolboxes

Starting MATLAB Type matlab into a terminal window Double-click matlab icon in windows env Troubleshooting: license file –Check for connection to internet and vpn –Check for updated license file –Keep trying over time if too many connections detected, problem will fix itself eventually

MATLAB Environment The MATLAB environment is designed to run as a GUI (graphical user interface) There is also a text-only version of MATLAB, which generally occurs when logging in remotely with an improperly set X11 forwarding Some options in MATLAB require the GUI, though most can be run in text-only mode Text-only mode not recommended

MATLAB GUI

MATLAB GUI – Current Directory

Setting the path: –You need to set up what directory to save your files to –Multiple options: directory commands, current directory path, current directory window –Directory commands: pwd, cd, dir, ls, path, editpath, copyfile, mkdir When in doubt, check your path

MATLAB GUI – Command Window

MATLAB GUI – Workspace

MATLAB GUI – Variable Editor

MATLAB GUI – Command History

MATLAB GUI – Additional Windows Editor window –Will discuss next week with scripts and functions Figure window –Will discuss in two weeks with graphics

MATLAB Help Three common ways to access: –Type help topic at command line –Select help from drop-down menus (opens help window) –Mathworks website –help, helpwin, helpdesk MATLAB help is very comprehensive

MATLAB Resources Getting Started with MATLAB 7 (Pratap) Mastering MATLAB 7 Additional online resources –A note of caution: methods that work in earlier versions of MATLAB do not necessarily work in later versions. Deprecated options are not obvious, so basically you just need to test them out. Generally dealing with objects (figures) has shown the most change.

Variables – Types Numeric Logical Strings and Character (discussed further with file I/O) Cell arrays and structures (discussed further with file I/O) Function handles (discussed further with graphics)

Variables – Names Must start with a letter Can contain any combination of letters, digits, and underscores Distinguishes between upper and lower case Don’t use function names –namelengthmax, which –all var_name, isvarname

Variables – Names Special functions that are already defined, but can be overwritten (temporarily) –pi, i, j, eps, realmin, realmax, Inf, NaN

Operations + Addition - Subtraction * Multiplication / Division ^ Power ‘ Matrix transpose () Specify order

Order of Operations Standard order of operations is enforced in MATLAB –Parentheses –Exponentiation –Multiplication and Division –Addition and Subtraction When in doubt, add parentheses MATLAB can help you keep track of ()

Elementary functions abs sqrt exp sin

Logical Operations &, |, ~, xor &&, || ==, ~=,, =

Arrays and Matrices MATLAB is designed for use with matrices, so many functions are optimized for matrix use This will be discussed further next week

Questions?