Professional Documents
Culture Documents
% Assigment No.2
% Assigment No.2
2
Y% Student Name: Zohaib
%BS Applied Physics, semester 8th, Section B, spring-2022
clc
clear al
close all
x=0:0.1:10;
y1=sin(x):
y2=cos(x);
y3=tan(X)
y4=csc(x):
y5=sec(x);
y6=cot (x);
y7asin(x);
y8=acos (x);
y9=atan(x);
y10=acsc(X)
y11-asec(x)
y12=acot(x);
figure( 1) % arrangement 01
subplot(6,6,1)
Piot(x,yl,'r')
xlabel( x )
ylabel(Sinx)
grid on
grid minor
title"sine function Graph )
colorbar
subplot(6,6,8)
plot(x,y2, 'k')
xlabelX
ylabel("cosx ")
grid on
grid minor
titlec cos ine function Graph1')
Colorbar
subplot(6,6,15)
plot(x,y3, 8)
xlabel( "x')
ylabel("tanx')
grid on
grid minor
title("tangent function Graph1')
colorbar
subplot (6,6,22)
plot(x,y4, 'c")
xlabel( x
ylabel("cscx')
grid on
grid minor
title'cosecant function Graph1')
colorbar
subplot (6,6,29)
plot(x,y5, m)
xlabel('x')
ylabel(
grid on
secx')
grid minor
title("secant function Graph1 ')
colorbar
subplot (6,6,36)
Plot(x,y6, c')
xlabel('x')
ylabel('cotx ')
8r on
8rid minor
title("cotangent funct ion Gr aph1 ')
colorbar
figure(2).% arrangement 02
Subplot(6,6,6)
plot(x,y7,'k°)
xlabel( 'x')
ylabel( 'asinx")
8ri on
8rid minor
title('inverse sine function Graph')
Colorbar
subplot(6,6,11)
plot(x,y8, 'r')
xlabel( x')
ylabel(
1d on
acosx')
8rid minor
grid minor
titlec"tangent function Graph')
Colorbar
subplot(6,6,21)
plot(x,y10, 'k*)
xlabel( 'x")
ylabel("acscx ')
8rid on
8rid minor
title( "cosecant function Graph')
colorbar
subplot(6,6,26)
plot(x,y10, 'g')
xlabel(x")
ylabel( 'asecx ")
8r1d on
grid minor
grid minor
title( 'sine function Graph )
colorbar
subplot (6,6,6)
Plot(x, y2, 'k*)
xlabel(X) 3/6
ylabel("cosx ")
'1d on
3
8rid minor
title("cosine funct ion Graph')
COlorbar
Subplot (6,6,9)
plot(x,y3, 'g')
xlabel(x)
ylabel('tanx
8rid on
")
grid minor
title'tangent function Graph')
colorbar
subplot (6,6,10)
plot(x,y4, 'c')
xlabel(X)
ylabel('cscx')
8rid on
grid minor
titlec"cosecant function Graph ' )
colorbar
subplot(6,6,13)
plot(x,y5, 'm°)
xlabel(X)
ylabel( secx ")
grid on
8rid minor
title('secant function Graph ')
colorbar
subplot (6,6,18)
plot(x,y6, 'c')
xlabel(x)
ylabel("cotx")
gri on
grid minor
t i t l e 'cotangent function Graph')
colorbar
Warning: Imag1nary p a r t s of complex X and/or Y arguments ignored
Warning: Imaginary parts of complex X and/or Y arguments ignored
Warning: Imaginary parts of complex and/or Y arguments ignored
Warning: Imaginary parts of complex X and/or Y arguments ignored
Warning: Imaginary parts of complex X and/or Y arguments ignored
-100
4/6
Inverse sine function Graph
0
tangentfunction Gragh
secantfunction Grap
X
0-100
secant function Graph T00
cotangent100function Graph
X
-100 -100