1 / 41

M A T L A B

M A T L A B. Eng. Osama Talaat osama063 @msn.com Faculty of Engineering, Zagazig University, Egypt 2013. 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.

kevin-blake
Download Presentation

M A T L A B

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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.

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

  4. Lecture (1) Introduction Eng. Osama Talaat

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

  6. MATLAB Setup Open MATLAB

  7. Arithmetic Operators

  8. Arithmetic Operators

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

  10. Layout: Command History • Clear command history

  11. Layout Controllers • Undock Dock • Maximize Restore. • Minimize Restore. • Move the tab.

  12. Variables

  13. Variables • 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 (;)

  15. Note: Multiplying by variable

  16. Layout: Workspace • Save variables …

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

  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

  19. Special Values: ans

  20. Special Values: PI, INF

  21. Special Values: NaN

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

  23. Inverse Trigonometric Functions Radian Degrees Maths >> 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 >> 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 >> log 10 ( 100 ) >> log 2 ( 1024 ) >> log( 3 ) >> exp ( 3 ) >> abs( - 12 ) >> sqrt ( 16 ) >> nthroot ( 27,3 )

  26. Test yourself • If x=1 calculate the following: >> x=1; >> f=( 5*log10(x)+2*x^3*sin(x)+log(x)*sqrt(x) ) / ( exp(6*x^2)+3*x^4+cos(x) ) f = 0.0041

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

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

  29. Complex Numbers

  30. Complex Numbers • implicit multiplying sign

  31. Complex Numbers

  32. Complex Numbers

  33. Complex Numbers

  34. Approximation Functions

  35. Approximation Functions

  36. Approximation Functions

  37. Approximation Functions

  38. Approximation Functions

  39. Help !! • Demos.

  40. MATLAB Tips >> bench

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

More Related