You are on page 1of 5

% Student Name: zohaib

% Assignment 3
%Section B, Semester 8th, Applled Physics Department
clc
Clear all
close alll
[u,v]=meshgrid(-10:0.1:10):
WSinc(sqrt(u.^2+v.^2));
figure( 1) .
surf(u,V,W)
Xlabellength )
ylabel("width')
zlabel("hieght ")
colorbar
colormap(jet)
egendSinx)
figure(2)
surfc(u,V,W)
xlabel(length )
ylabel("width')
zlabel( "hieght ')
colorbar
Colormap(jet)
egendSinx')
figure(3)
Contour(U,V,w)
xlabel(length
ylabel("'width")
zlabelhieght
colorbar
")
colormap(jet)
legend(sinx ' )
T18ure(4)
pcolor(u,v,w)
xlabel("length
ylabel( width')
zlabel("hieght ')
colorbar
colormap(jet)
legend( 'sinx')
%using subplot command
figure(5)
subplot(2.2,1)
surf(u,V,w)
xlabel("length' )
ylabel( "Width')
zlabel("hieght')
colorbar
colormap(jet)
legend(sinx)
subplot (2,2,2)
surfc(u,V,W)
xlabel("length')
ylabel("width')
Zlabel("hieght ')
colorbar
Colormap(jet)
egend( "sinx')
Subplot(2,2,3)
contour(u,v,w)
xlabel(length )
yLabel( "width'))
zlabel("hieght')
colorbar
colormap(jet)
legend(°sinx )
Subplot (2,2,4)
pcolor(u,v,w)
xlabel("length )
ylabel("width' )
zlabel('hieght')
colorba
colormap(jet)
legend(" sinx ')

sirax
.8

.6
0.5

02

0.5
10
10

5 02
WIdtn -10 10
length
sinx
0.8

0.6
5

04

02
0.5

0
5

0.2
width -10 -10 length

si
0.8

O.6

10 10 10
2

length
8
sinx
.8

0.6

0.4

2
0.2

-10
10 5 0

length

hieght sin hiegnt sinx

. 0.5

width length width length

ED sinx six

0.5 0.5

-10 10

ngth length
Published with MATLAB0 R2017a

You might also like