View Full Document

Introduction to MATLAB



View the full content.
View Full Document
View Full Document

26 views

Unformatted text preview:

Introduction to MATLAB Zongqiang Liao Research Computing Group UNC Chapel Hill Course outline Introduction Getting started Mathematical functions Matrix generation Matrix and array operations Reading and writing data files Basic plotting Basic programming its unc edu 2 Introduction its unc edu Introduction The name MATLAB stands for MATrix LABoratory It is good at dealing with matrices Vendor s website http www mathworks com Advantages of MATLAB Easiness of use Powerful build in routines and toolboxes Good visualization of results Disadvantage of MATLAB Can be slow its unc edu 4 Getting started its unc edu Getting started MATLAB desktop The Command Window The Command History The Workspace The Current Directory The Help Browser The Start Button its unc edu 6 Getting started Keeping track of your work session diary command diary or diary FileName Stop the recording diary of Start the recording again diary on its unc edu 7 Getting started Using MATLAB as a calculator 1 2 3 ans 7 You may assign the value to a output variable x 1 2 3 x 7 x can be used in the some calculation later 4 x ans 28 its unc edu 8 Getting started Suppressing output You can suppress the numerical output by putting a semicolon at the end of the line t 13 We can place several statements on one line separated by commas or semicolons t 13 u 5 t v t 2 u u 65 v 104 its unc edu 9 Getting started Managing the workspace The results of one problem may have an efect on the next one Issue a clear command at the start of each new independent calculation clear or clear all its unc edu 10 Getting started Miscellaneous commands To clear the Command Window clc To abort a MATLAB computation ctrl C To continue a line its unc edu 11 Getting started Getting help Use help to request info on a specific function help sqrt Use doc function to open the on line version of the help menu doc plot Use lookfor to find function by keywords lookfor functionkeyword its unc edu 12 Mathematical functions its unc edu Mathematical



Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Introduction to MATLAB and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to MATLAB and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?