Your objective: to dominate! My objective: to help you dominate!

Slides:



Advertisements
Similar presentations
Introduction to Programming using Matlab Session 2 P DuffourJan 2008.
Advertisements

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.
Stata and logit recap. Topics Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with.
Functions.
Division Example 2x - 3y + 4z = 10 x + 6y - 3z = 4 -5x + y + 2z = 3 A*X = B where A = B = >> X = A\B X =
Non-Linear Simultaneous Equations
ME457 Mechatronic System Modeling MICHIGAN STATE UNIVERSITY Matlab® refresher Your objective: to dominate! My objective: to help you dominate!
Digital Image Processing Lecture3: Introduction to MATLAB.
Programming For Nuclear Engineers Lecture 12 MATLAB (3) 1.
EGR 1101 Unit 7 Systems of Linear Equations in Engineering (Chapter 7 of Rattan/Klingbeil text)
January 24, 2005 Lecture 3 - By P. Lin 1 CPET 190 Lecture 3 Problem Solving with MATLAB
MATLAB File Management. MATLAB User File Management Matlab provides a group of commands to manage user files. For more information, type help iofun. pwd.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 11 MuPAD PowerPoint to accompany Copyright © The McGraw-Hill Companies,
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
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.
1 Tips for solving Project 1 Reactor SO 3 SO 2 +O 2.
Compiled Matlab on Condor: a recipe 30 th October 2007 Clare Giacomantonio.
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.
Copyright © The McGraw-Hill Companies, Inc. Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 1 An Overview of MATLAB.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
A Brief introduction to MatLAB ($50 - $99 for students)
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Introduction to MATLAB
Winter Semester 2014/2015 College of Engineering.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
CSE123 Lecture 3 Files and File ManagementScripts.
Files: By the end of this class you should be able to: Prepare for EXAM 1. create an ASCII file describe the nature of an ASCII text Use and describe string.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
ME 142 Engineering Computation I Exam 3 Review Mathematica.
訊號與系統 廖文淵 德霖技術學院資訊工程系 Introduction to MATLAB.
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
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.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
Getting started with Matlab: Outline
Matlab Programming for Engineers
Introduction to Matlab
Introduction to MATLAB
Release Numbers MATLAB is updated regularly
BAHASA PEMROGRAMAN MATLAB as an Engineering Tool & Programming Language a lecture note for Civil Engineering students of PETRA Christian University Doddy.
Introduction to Matlab and Simulink
Introduction to MATLAB for Engineers
Appendix B MathScript Basics
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
Introduction to MATLAB for Engineers, Third Edition
Managing results files
Introduction to MATLAB
Matlab Diary Matlab allows you to keep a log or diary of your work.
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
User Defined Functions
Lecture 1: Introduction
Matlab review Matlab is a numerical analysis system
Systems of Linear Equations in Engineering
Solve Systems of Linear Inequalities
Code is on the Website Outline Comparison of Excel and R
Review Make sure current directory is set properly Create a diary
M434/534 Numerical Linear Algebra MATLAB Tutorial Session (Fall 2010)
Digital Image Processing
Applied Numerical Methods
Communication and Coding Theory Lab(CS491)
funCTIONs and Data Import/Export
Using Script Files and Managing Data
Reading Between the Lines!
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Chapter 2 MATLAB Environment
Presentation transcript:

Your objective: to dominate! My objective: to help you dominate! Matlab® refresher Your objective: to dominate! My objective: to help you dominate!

Some references MATLAB Student Version: Learning MATLAB, The MathWorks, Inc. Introduction to MATLAB 6 for Engineers, W.J.Palm III, McGraw-Hill. Numerical Methods with MATLAB, G.Recktenwald, Prentice Hall.

Key concept: the Workspace (WS) The Workspace (WS) contains all of your currently active variables and relations. These are initially entered by typing commands (most likely). Useful Workspace commands: Clear : empty the WS Who (whos) : show what is in the WS Save <filename>: save all WS variables to file Load <filename>: retrieve a particular WS from file

Key concept: WS inputs WORKSPACE Command line inputs Script file inputs Workspace file inputs

Key concept: WS outputs Diary files WORKSPACE Workspace files Graphics (plot) files

Script files Script files are text files that are created using the MATLAB script file editor. They usually have the suffix .m. A script file can be run from the command line or toolbar. Two items to remember about .m files: Use “%” to enter comments for your use. Use “;” at the end of lines to suppress echo printing when the file is run.

More about the Workspace Recording your MATLAB session can be useful for documentation. Useful Workspace commands: Diary <filename> : turn on recording of all text i/o except plots, save into <filename> Diary off : turn off current recording Path : pointer to current directory Pathtool : directory browser

A typical session pattern Clear Diary Problem1 { create data etc here …} Pa= 14.7; R= 245.6; P= 23; Q = (1/R)*(P-Pa); who Save Problem1Run1 Diary off You now have 2 files: Problem1: a diary of this session Problem1Run1: a WS file that can be used to recover your last state by using a Load command

Solving Linear Algebraic Equations Define a set of linear algebraic equations as follows: A*X = B*U X is the unknown vector (n x 1) U is the input vector (m x 1) A is n x n, B is n x m In the WS define A, B, and U. Then type X= inv(A)*B*U Click here to see an example session: LAExample1

Solving Linear Algebraic Equations Dominators know that a unique solution to a problem in linear algebra doesn’t always exist. To investigate before you leap try this: Use the command det(A) to check the determinant of A. Proceed accordingly. Sometimes we seek insight in the form of eigenvalues of A. Try this: Type Evals= eig(A). Click here to see an example session: LAExample2

Solving Linear Differential State Equations Define a set of linear algebraic equations: Xdot = A*X + B*U Xdot is the first derivative of X. Create a script (.m) file that defines the equations for MATLAB in a specific format. for example: LDEEqns1.m Create a script file that controls the solving of the problem. click to see an example: LDEExample.pdf