Escolar Documentos
Profissional Documentos
Cultura Documentos
Graficas en Matlab
Profesor: Cesar González Cervantes
Alumnos
Nombre Matricula Carrera
Abelardo Guerra Rodríguez 1862620 IEC
fx=inline('cos(theta)^4*sin(theta)*cos(phi)');
fy=inline('cos(theta)^4*sin(theta)*sin(phi)');
fz=inline('cos(theta)^4*cos(theta)');
figure
ezmesh(fx,fy,fz,[0 2*pi 0 pi],100)
colormap([jet])
shading interp
axis equal
set(gca,'xdir','reverse','ydir','reverse')
%Abelardo Guerra Rodriguez 1862620 IEC
fx=inline('(1.*cos(pi./4.*cos(theta)+pi/4)/2)*sin(theta)*cos(phi)');
fy=inline('(1.*cos(pi./4.*cos(theta)+pi/4)/2)*sin(theta)*sin(phi)');
fz=inline('(1.*cos(pi./4.*cos(theta)+pi/4)/2)*cos(theta)');
ezmesh(fz,fy,fz,[0 pi 0 2*pi],100)
ezsurf(fx,fy,fz,[0 pi 0 2*pi],100)
shading interp
axis equal
set(gca,'xdir','reverse','ydir','reverse')
t=0:.01:2*pi;
theta=0:.01:2*pi;
AF=(1.*cos(pi./4.*cos(theta)+pi/4))./2;
figure(2)
polarplot(t,AF)
%Abelardo Guerra Rodriguez 1862620 IEC
% Distancias de Fraunhoffer
r1 = 100;
r2 = 300;
% Densidades de potencia w1 y w2
w1 = abs(10*sin(THETA).^2/r1^2);
w2 = abs(10*sin(THETA).^2/r2^2);
subplot(2, 1, 2)
polarplot(THETA, w2, 'b')
title('Campo lejano a 300 Mts')
% 3D para w2
figure(2)
x = w2 .* sin(THETA) .* cos(PHI);
y = w2 .* sin(THETA) .* sin(PHI);
z = w2 .* cos(THETA);
S =surface(x, y, z, abs(w2));
axis equal
axis on
lighting gouraud;
shading interp;
view(0, 40)
title('Campo lejano a 300 Mts')
% 3D para w1
figure(3)
x = w1 .* sin(THETA) .* cos(PHI);
y = w1 .* sin(THETA) .* sin(PHI);
z = w1 .* cos(THETA);
S = surface(x, y, z, abs(w1));
axis equal
axis on
lighting gouraud;
shading interp;
view(0, 40)
title('Campo lejano a 100 Mts')
% En coordenadas cartesianas
% Campo a 300mts
figure(4)
plot(theta, w2)
title('Campo lejano a 300mts')
ylabel('Nivel de señal a 300 mts')
xlabel('En elevación')
set(0,'defaultfigurecolor','w')
N=2;
lmda=1;
d=lmda/4;
k=2*pi/lmda;
bta=0;
th=-pi:.01:pi;
ang=th*180/pi;
AF1=(cos(k*d*(cos(th)+bta)/2));
figure
plot(ang,AF1,'k')
xlabel('\theta')
ylabel('Patron')
axis([-90 90 0 1])
grid
figure(2)
polarplot(th,AF1,'k')
grid on
view(-90,90)
%Abelardo Guerra Rodriguez 1862620 IEC