Matlab 1
Matlab 1
5
2
Q1. 5
2 −1
Ans. 25 /( 25−1)
= 1.0323
Q 2.3∗
( ( √ 5−1 )
( √5−1 )
2
)
Ans. 3*((sqrt (5)-1)/ ((sqrt (5)-1)^2))
= 2.4271
3
Q 3. e
Ans. exp(3)
= 20.0855
3
Q 4. Find ln (e )
Ans. log(exp(3))
=3
Q 5. Find sin ( π6 )
Ans. sin(pi/6)
= 0.5000
Ans. log10(exp(3))
= 1.3029
Ans. log10(10^5)
=5
Ans. exp(pi*sqrt(163))
= 2.6254e+17
1
General Solutions
Ans. r = ((pi)^(1/3))-1;
a = pi*((r)^2)
a =0.6781
Ans. x= 32*pi;
y = ((cosh(x))^2)- ((sinh(x))^2)
y =0
1+3 i
Q14. Find .
1−3i
Ans. (1+3i)/(1-3i)
= -0.8000 + 0.6000i
π
i.
4
Q 15. Find e
Ans. exp(i*(pi/4))
= 0.7071 + 0.7071i
π
Q16. Find e 4 i
Ans. exp((pi/4i))
= 0.7071 - 0.7071i
Ans.
m = 0.5;
c = -2;
x = [0, 1.5, 3, 4, 5, 7, 9,10];
y = (m*x) + c
y= Columns 1 through 7
Column 8
2
General Solutions
3.0000
Ans.
t = [1:10];
x = t.*(sin(t))
x=
Columns 1 through 7
Columns 8 through 10
y = (t-1)./(t+1)
y=
Columns 1 through 7
Columns 8 through 10
z = (sin(t.^2))./(t.^2)
z=
Columns 1 through 7
Columns 8 through 10
Ans.
r= 2;
theta = [0,pi/4,pi/2,3*(pi/4),pi,5*(pi/4)];
x = r*cos(theta)
3
General Solutions
x=
2.0000 1.4142 0.0000 -1.4142 -2.0000 -1.4142
y = r*sin(theta)
y=
0 1.4142 2.0000 1.4142 0.0000 -1.4142
Ans. r = 0.5;
x = [0:10];
y = [r.^x]
y=
Columns 1 through 8
Columns 9 through 11
u = sum(y)
u=
1.9990