Introduction to MATLAB(6/22 MATLAB Environment He Edt Debus Deptog wedew Hep 5如年刀灯m与A到匠情约喻 Suppose that you To get started,select MATLAB Help or Demos from the Help menu. want to calculate the Fle r502.m M area=pi*2.52 area of a circle with a 编 3:055.m G:056m area= radius of 2.5 m. 金 G:05t7.m 51m Fle 19.6350 >x1=1+1/2+13+1/4+1/5+1/6g >X1=1+1/2+13-14… and Hist向y +1/5+1/6 128-22上午1164 77 i2.52 /
Introduction to MATLAB(6/22) MATLAB Environment Suppose that you want to calculate the area of a circle with a radius of 2.5 m
Introduction to MATLAB(7/22 MATLAB Environment The Command History Window Command History nargin(Ex0511) 白%一一 12-8-5上午4:16--% nargin('fun',ex0511) nargin (Ex0511) nargin('Ex0511') nargin('ex0511') nargout(ex0511’) 白%一一 12-8-25 Cut Ctrl+X -launch pa Copy Ctrl+C clc Evaluate Selection 白% 12-8-25 reap2水2 Create M-File x1=1+1/2+ Create Shortcut x1=1+1/2+ Profile Code +1/5+1/6: Delete Selection Delete to Selection 同停大学 Clear Entire History TONGJI UNIVERSITY Start
Introduction to MATLAB(7/22) MATLAB Environment The Command History Window
Introduction to MATLAB(8/22 MATLAB Environment The Edit/Debug Window >Create new M-files 。File/New/M-file' .Clicking the DToolbar icon Input edit'in the command window >Open an existing one .File/Open” .Clicking the Toolbar icon @月济大学 AW TONGJI UNIVERSITY
Introduction to MATLAB(8/22) MATLAB Environment ➢Create new M-files •“File/New/M-file” •Clicking the Toolbar icon • Input ‘edit’ in the command window ➢Open an existing one •“File/Open ” •Clicking the Toolbar icon The Edit/Debug Window
Introduction to MATLAB(9/22 MATLAB Environment The Edit/Debug Window MATLAB 回 File Edit Debug Desktop Window Shorteuts [e]How to Add what'e New Current Directory G201 Command winclow 白半网包见· >cale_area 】Ex0511a ASV File The area of the cirele is 19.635 Ex0511.m >> MAT-file calc_area.m M-file Current Directory Workepaoe Command History 12 -Iaunch pad 825上午143—% 66 +1/d+1/5+1/ 1=1+1/2+1/3+1/a +1/5+1/6 calc_area @月海大学 TONGJI UNIVERSITY
Introduction to MATLAB(9/22) MATLAB Environment The Edit/Debug Window