Presentation is loading. Please wait.

Presentation is loading. Please wait.

M A T L A B Eng. Osama Talaat Faculty of Engineering, Zagazig University, Egypt 2013 1.

Similar presentations


Presentation on theme: "M A T L A B Eng. Osama Talaat Faculty of Engineering, Zagazig University, Egypt 2013 1."— Presentation transcript:

1 M A T L A B Eng. Osama Talaat osama063@msn.com Faculty of Engineering, Zagazig University, Egypt 2013 1

2 Course Web Page www.osamatalaat.com/matlab  You can also navigate to it by: www.osamatalaat.com >> Teaching >> Matlab.  You shall find lecture materials and course resources.  Bookmark this page and keep visiting it regularly after each lecture to download its material. 2

3 About MATLAB Calculator Programming Language Toolboxes Simulation 3 Solving Equations Matrices Graphs Communication Control Systems Image Processing Simulink Console programs GUI

4 Lecture (1) Introduction Eng. Osama Talaat 4

5 MATLAB R2013a  Latest version – Download from the webpage. 5

6 MATLAB Setup 6 Open MATLAB

7 Arithmetic Operators 10 + 2 10 – 2 10 × 2 7

8 Arithmetic Operators 10 2 / \ 8

9 Layout: Command Window  Clear command window using GUI  Clear command window using Commands >> clc 9

10 Layout: Command History  Clear command history 10

11 Layout Controllers 11

12 Variables 12 قيمة مباشرة ناتج عملية حسابية متغير من آخر

13 Variables 13 متغير من نفسه NB: Names (variables, files, …)  characters & Numbers, but starts with char.  No spaces.  No symbols except underscores (_).  Case sensitive (also commands).  Maximum length = 64 (increasing value). NB: display variable value.

14 Note: Simi-Colon (;) 14

15 Note: Multiplying by variable 15 No implicit multiplying sign

16 Layout: Workspace  Save variables … 16

17 Layout: Current Directory  Current Directory address bar.  Change Current Directory. 17

18 Layout: Workspace  Save variables:  Ctrl + S  GUI  Code >> save osama.mat  Clear workspace using GUI and Code. >> clear a >> clear b c >> clear  Load saved variables:  Ctrl + O  Code >> load osama.mat 18

19 Special Values: ans 19 ناتج آخر عملية حسابية لم يتم تخزينها

20 Special Values: PI, INF 20

21 Special Values: NaN 21 كمية غير محددة

22 Trigonometric Functions >> sin(x) >> cos(x) >> tan(x) >> sec(x) >> csc(x) >> cot(x) >> sind(x) >> cosd(x) >> tand(x) >> secd(x) >> cscd(x) >> cotd(x) 22 Radian by default Degrees

23 Inverse Trigonometric Functions 23 RadianDegreesMaths >>asin(x)>>asind(x) >>acos(x)>>acosd(x) >>atan(x)>>atand(x) >>asec(x)>>asecd(x) >>acsc(x)>>acscd(x) >>acot(x)>>acotd(x)

24 Hyperbolic Functions 24 >> sinh(x) >> cosh(x) >> tanh(x) >> sech(x) >> csch(x) >> coth(x) >> asinh(x) >> acosh(x) >> atanh(x) >> asech(x) >> acsch(x) >> acoth(x)

25 Other Mathematical Functions 25 >> log10(100) >> log2(1024) >> log(3) >>exp(3) >> abs(-12) >>sqrt(16) >>nthroot(27,3)

26 Test yourself 26

27 Other Mathematical Functions 27 إيجاد الأعداد الأولية حتى الرقم 10 اختبار هل العدد أولي أم لا

28 Other Mathematical Functions 28 تحليل العدد إلى مكوناته الأولية

29 Complex Numbers 29 i or j

30 Complex Numbers 30 Using i or j as variables implicit multiplying sign

31 Complex Numbers 31 القيمة المطلقة للعدد المركب زاوية العدد المركب المرافق

32 Complex Numbers 32 الجزء الحقيقي الجزء التخيلي اختبار وجود جزء تخيلي من عدمه

33 Complex Numbers 33

34 Approximation Functions 34 Normal Approximation

35 Approximation Functions 35 Round towards positive infinity

36 Approximation Functions 36 Round towards negative infinity

37 Approximation Functions 37 Round towards Zero

38 Approximation Functions 38 Round towards Zero

39 Help !!  Demos. 39

40 MATLAB Tips >> bench 40

41 GOOD LUCK To be continued in the next lecture … 41


Download ppt "M A T L A B Eng. Osama Talaat Faculty of Engineering, Zagazig University, Egypt 2013 1."

Similar presentations


Ads by Google