Is there anyway to enlarge the output picture and coordinate axis together like Matlab?
Like MatrixPlot
or other Plot function.
In matlab, there is a zoom button in the picture display window. You can zoom in or out by clicking the Zoom button. The coordinates of the picture will also change accordingly. But I don't know how to do it in mathematica. Or does Mathematica can do this?
like use coordinate matrix x,y
to plot a image mesh(x,y,abs(G))
.
Update:
Matlab can do like this: zoom in/out
We can see in Matlab, the coordinates correspond to the values of the elements of the matrix when the matrix is drawn. But in Mathematica, it's not so easy to graph matrices in terms of coordinates and zoom in.
Matlab code for A simple example:
N=500;
L=100;
I=zeros(N,N);
[x,y]=meshgrid(linspace(-200,200,N));
[x0,y0]=meshgrid(linspace(-0.5,0.5,N));
lamda_1=632;
lamda=lamda_1/1e6;
k=2*pi/lamda;
z=1000000;
h=exp(1j*k*z)*exp((1j*k*(x.^2+y.^2))/(2*z))/(1j*lamda*z);
B=fftshift(fft2(I.*exp((1j.*k.*(x0.^2+y0.^2)))));%
G=h.*B;
figure
mesh(x,y,abs(G));
colorbar
title('Intensity')
Manipulate
that lets you adjust the coordinate ranges! (unfortunately I'm not in a position to write it down at the moment, but it should be fairly straightforward) $\endgroup$