如何绘制Wolfram Alpha网格? [MATLAB] [英] How to plot the Wolfram Alpha grid? [MATLAB]
问题描述
我想为此网格绘制任何功能:
I would like to plot for any function this grid :
这是f(z)-> 1/z的特例
This is the special case for f(z) -> 1/z
这是您可以在Wolfram alpha上找到的典型图形.但是,我不知道如何进行.想法是看在应用f之后将1-square的复杂网格的线发送到哪里.
This is a typical graph you can find on wolfram alpha. Nevertheless I don't know how to proceed. The idea would be to see where the lines of the complex grid of the 1-square is sent after applying f.
一件很棒的事情是在网格上添加颜色,以查看左侧部分的发送位置. (例如此处: https://www.youtube.com/watch?v=JX3VmDgiFnY) 如果您有任何想法...谢谢.
One thing that could be great would be to add colors on the grid in order to see where the left part is sent. (like here : https://www.youtube.com/watch?v=JX3VmDgiFnY) If you have any idea... thank you.
推荐答案
尝试下面的代码.我已经更新了答案,以不同的颜色显示线条.
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
这篇关于如何绘制Wolfram Alpha网格? [MATLAB]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!