x=-20:.1:20;y=-20:.1:20;
[X,Y] = meshgrid(x,y);
a=-0.05;b=0.75;
% Real Component : e^(ax)cos(by)
z=exp(a*X).*cos(b*Y);
subplot(2,2,1)
mesh(X,Y,z)
zrr=exp(a*x).*cos(b*0);
hold on
plot3(x,zeros(length(x)),zrr,'r','LineWidth',3)
zir=exp(a*0).*cos(b*y);%zi=exp(j*b*y);
plot3(zeros(length(x)),y,zir,'r','LineWidth',4)
zrr=exp(a*x).*cos(b*y);%zrr.*zir;
plot3(x,y,zrr,'b','LineWidth',4)
hold off
% Imaginary Component : je^(ax)sin(by)
z=exp(a*X).*sin(b*Y);
subplot(2,2,2)
mesh(X,Y,z)
hold on
zri=exp(a*x)*sin(0);
plot3(x,zeros(length(x)),zri,'r','LineWidth',3)
zii=exp(a*0)*sin(b*y);
plot3(zeros(length(x)),y,zii,'r','LineWidth',4)
zii=exp(a*x).*sin(b*y);
plot3(x,y,zii,'b','LineWidth',4)
hold off
subplot(2,2,3)
plot(zrr+j*zii)
[X,Y] = meshgrid(x,y);
a=-0.05;b=0.75;
% Real Component : e^(ax)cos(by)
z=exp(a*X).*cos(b*Y);
subplot(2,2,1)
mesh(X,Y,z)
zrr=exp(a*x).*cos(b*0);
hold on
plot3(x,zeros(length(x)),zrr,'r','LineWidth',3)
zir=exp(a*0).*cos(b*y);%zi=exp(j*b*y);
plot3(zeros(length(x)),y,zir,'r','LineWidth',4)
zrr=exp(a*x).*cos(b*y);%zrr.*zir;
plot3(x,y,zrr,'b','LineWidth',4)
hold off
% Imaginary Component : je^(ax)sin(by)
z=exp(a*X).*sin(b*Y);
subplot(2,2,2)
mesh(X,Y,z)
hold on
zri=exp(a*x)*sin(0);
plot3(x,zeros(length(x)),zri,'r','LineWidth',3)
zii=exp(a*0)*sin(b*y);
plot3(zeros(length(x)),y,zii,'r','LineWidth',4)
zii=exp(a*x).*sin(b*y);
plot3(x,y,zii,'b','LineWidth',4)
hold off
subplot(2,2,3)
plot(zrr+j*zii)

No comments:
Post a Comment