490 likes | 735 Views
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.
E N D
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. • Bookmark this page and keep visiting it regularly after each lecture to download its material.
About MATLAB • Calculator Solving Equations Matrices Graphs • Programming Language Console programs GUI • Toolboxes Communication Control Systems Image Processing • Simulation Simulink
Lecture (1) Introduction Eng. Osama Talaat
MATLAB R2013a • Latest version – Download from the webpage.
MATLAB Setup Open MATLAB
Layout: Command Window • Clear command window using GUI • Clear command window using Commands >> clc
Layout: Command History • Clear command history
Layout Controllers • Undock Dock • Maximize Restore. • Minimize Restore. • Move the tab.
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.
Layout: Workspace • Save variables …
Layout: Current Directory • Current Directory address bar. • Change Current Directory.
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
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
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 )
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)
Other Mathematical Functions >> log 10 ( 100 ) >> log 2 ( 1024 ) >> log( 3 ) >> exp ( 3 ) >> abs( - 12 ) >> sqrt ( 16 ) >> nthroot ( 27,3 )
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
Other Mathematical Functions • إيجاد الأعداد الأولية حتى الرقم 10 • اختبار • هل • العدد • أولي • أم • لا
Other Mathematical Functions • تحليل العدد إلى مكوناته الأولية • مضروب العدد
Complex Numbers • implicit multiplying sign
Help !! • Demos.
MATLAB Tips >> bench
GOOD LUCK To be continued in the next lecture …