0% found this document useful (0 votes)
29 views3 pages

Tutorial MATHLAB: Introduction (2) (7/10/16) Khairi Hazwan Bin MD Abdul Razak 56213215014

This document provides examples of using MATLAB to perform various mathematical operations. It demonstrates how to calculate values using variables, perform operations on complex numbers, use exponential, logarithmic, trigonometric and other functions, and combine results of multiple calculations.

Uploaded by

Alif Akmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Tutorial MATHLAB: Introduction (2) (7/10/16) Khairi Hazwan Bin MD Abdul Razak 56213215014

This document provides examples of using MATLAB to perform various mathematical operations. It demonstrates how to calculate values using variables, perform operations on complex numbers, use exponential, logarithmic, trigonometric and other functions, and combine results of multiple calculations.

Uploaded by

Alif Akmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Tutorial MATHLAB: Introduction (2) (7/10/16)

KHAIRI HAZWAN BIN MD ABDUL RAZAK 56213215014

(a)
>> x=10;
>> y=-20;
>> z=30;
>> a=5*(x^2)-6*y+7*z
a=
830
>> b=(3*(y^2))/(4*x-5*(z^3))
b=
-0.0089
>> c=(1+1/x)^-1
c=
0.9091

(b)
>> N=13-7i;
>> magnitude=abs(N)
magnitude =
14.76
>> Phase_angle=angle(N)
Phase_angle =
-0.49
>> Complex_conjugate=conj(N)
Complex_conjugate =
13.0000 + 7.0000i

(c)

>> x=5+9i;
>> y=6-2i;
>> a=x+y
a=
11.0000 + 7.0000i
>> b=x*y
b=
48.0000 +44.0000i
>> c=x/y
c=
0.3000 + 1.6000i

(d)
i)

>> a=exp(-2.1)^3;
>> b=3.47*log(14);
>> c=287^0.25;
>> x=a+b+c
x=
13.2753

ii)
>> x=(4.12*pi/6)^2;
>> cosd(x)
ans =
1.00

iii)
>> a=6*pi*atand(12.5);
>> b=4;
>> a+b
ans =
1614.24

You might also like