Practical 1: Introduction to MATLAB

Elementary Mathematical Functions

Using Mathematical Functions

 

> Let  x = 1.2 . Verify that the following expressions have the values shown, by typing in the correct MATLAB commands.

 

Mathematical expression Answer MATLAB command/Tips
 \frac{1}{ \sqrt{2 \Pi } }e^{- \frac{1}{2}x^{2}} 0.1942 1/sqrt(2*pi)*exp(-0.5*1.2^2)
 \frac{ \sqrt[3]{5+cos4x} }{\left|sin3x\right|} 3.8866 (5+cos(4*1.2))^(1/3)/abs(sin(3*1.2))
 \sin^{2}\left( \pi x\right) 0.3455 Sets of brackets required: 1
 \frac{e^{ \sin x}}{ \sqrt{x^{2}+1} } 1.6259 Sets of brackets required: 3
x \arctan x- \frac{1}{2} \ln \left(1+x^{2}\right) 0.6053 Note: you will need to look up the arctangent function in the MATLAB help files (click on Help at the top menu). Sets of brackets required: 3