How to plot the Wolfram Alpha grid? [MATLAB]

最后都变了- 提交于 2019-12-02 13:21:04

Try the code below. I have updated the answer to show the lines in different colors.

clear
clc

N = 101;
x = linspace(-1, 1, N);
y = x;
[X,Y] = meshgrid(x,y);

Z = X + Y*1i;

f = 1./Z;

U = real(f);
V = imag(f);

%Plot transformed mesh
hold off
plot(U,V,'b-');
hold on
plot(U',V','r-');

xlim([-5,5]);
ylim([-5,5]);
axis equal
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!