|
图形根据教材解释绘制,贴出MATLAB代码来,供大家参考。欢迎提供宝贵意见!
设 z = x + i y, w = u + i v, 则 w = z^2 = (x^2-y^2) + i*2*x*y 反映了两对变量 u,v 和x,y 之间的对应关系,因为涉及到 4 个变量,无法用一个平面内的几何图形表示出来, 必须把它看成两个复平面上的点集之间的对应关系。下面的图形反映了复平面z 上的三角形、矩形、双曲线和直线点集与其对应到w上的映射点集。
clear,clc,close allfigure('color',[1,1,1]);alpha = pi/6;x = 0:0.1:1; y = tan(alpha)*x; x=[x,x(end)*ones(1,10),x(1)];y = [y,linspace(y(end),0,10),y(1)];subplot(2,2,1);fill(x,y,'m');axis equal;axis([0,1.2,0,1.2]);text(0.5,0.8,'$$z$$','interpreter','latex');xlabel('$$x$$','interpreter','latex');ylabel('$$y$$','interpreter','latex');%%% uov 映射点解z = x + i*y; w = z.^2; u = real(w); v = imag(w);u = [u,u(end),u(1)];v=[v,0,v(1)];subplot(2,2,2);fill(u,v,'c');axis equal;axis([0,1.2,0,1.2]);text(0.8,0.8,'$$w=z^2$$','interpreter','latex');xlabel('$$u$$','interpreter','latex');ylabel('$$v$$','interpreter','latex');%%%%%%%%%%%%%%%%%% 矩形区域n = 10; x1 = -1; x2 = 1; y1 = 0.5; y2 = 1;x = [linspace(x1,x2,n),x2*ones(1,n),linspace(x2,x1,n),x1*ones(1,n)];y = [y1*ones(1,n),linspace(y1,y2,n),y2*ones(1,n),linspace(y2,y1,n)];subplot(2,2,3);fill(x,y,'m');axis equal;axis([-1,1.2,0,1.2]);text(0.5,0.8,'$$z$$','interpreter','latex');xlabel('$$x$$','interpreter','latex');ylabel('$$y$$','interpreter','latex');%%% uov 映射点解z = x + i*y; w = z.^2; u = real(w); v = imag(w);u = [u,u(end),u(1)];v=[v,0,v(1)];subplot(2,2,4);fill(u,v,'c');axis equal;axis([-2,2,-2.2,2.2]);text(0.8,0.8,'$$w=z^2$$','interpreter','latex');xlabel('$$u$$','interpreter','latex');ylabel('$$v$$','interpreter','latex');%%%%%%%%%%%%%figure('color',[1,1,1]); x1 = -2; x2 = 2; y1 = -2; y2 = 2;h = 0.01;[x,y] = meshgrid(x1:h:x2,y1:h:y2);u = x.^2 - y.^2; v = 2*x.*y;subplot(2,2,1);contour(x,y,u,'b'), hold on; contour(x,y,v,'r--'),xlabel('$$x$$','interpreter','latex');ylabel('$$y$$','interpreter','latex');h = 0.5; n = (x2-x1)/h;for i = 1:n+1subplot(2,2,2);hold on;plot([x1+(i-1)*h,x1+(i-1)*h],[y1,y2],'b');plot([x1,x2],[y1+(i-1)*h,y1+(i-1)*h],'r--');endbox;xlabel('$$u$$','interpreter','latex');ylabel('$$v$$','interpreter','latex');%%%%x1 = -2; x2 = 2; y1 = -2; y2 = 2; h = 1.0; n = (x2-x1)/h;for i = 1:n+1 % 固定z平面直线subplot(2,2,3);hold on;plot([x1+(i-1)*h,x1+(i-1)*h],[y1,y2],'r--');plot([x1,x2],[y1+(i-1)*h,y1+(i-1)*h],'b');endbox;xlabel('$$x$$','interpreter','latex');ylabel('$$y$$','interpreter','latex');for i = 1:nsubplot(2,2,4); hold on; lam = i*0.5; u = -8:0.1:8;u1 = (lam^2-u).*((lam^2-u)>=0);v1 = 2*lam*sqrt(u1);plot(u,v1,'b--');%x为常数v2 = -2*lam*sqrt(u1);plot(u,v2,'b--');u2 = (lam^2+u).*((lam^2+u)>=0);v3 = 2*lam*sqrt(u2);plot(u,v3,'r-');%y为常数v4 = -2*lam*sqrt(u2);plot(u,v4,'r-');endaxis([-8,8,-8,8]);grid on;boxxlabel('$$u$$','interpreter','latex');ylabel(''$$v$$','interpreter','latex');
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-23 08:52
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社