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
12Πe12x2 0.1942 1/sqrt(2*pi)*exp(-0.5*1.2^2)
35+cos4x|sin3x| 3.8866 (5+cos(4*1.2))^(1/3)/abs(sin(3*1.2))
sin2(πx) 0.3455 Sets of brackets required: 1
esinxx2+1 1.6259 Sets of brackets required: 3
xarctanx12ln(1+x2) 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