Hi, Can I draw a slice (or a line) through a 2D plot? I am trying to design the phase profile of a metalens and I have a phase profile already generated but I want to verify if my variables are correct. Below is the code I used.
4 次查看(过去 30 天)
显示 更早的评论
%Lens function clear all; close all; x0=input ('Inputting the location of the center of the collimated Gaussian beam x0=y0,enter x0 (from -8 to 8) ='); y0=x0; M=594; %M in microns N=594; %N in microns y=-29.7; ff=5; %unit in microns
for c=1:N; x=-29.7; for r=1:M; phi(r,c)=(2*pi/(0.65)).*(ff-((x-x0).^2+(y-y0).^2+ff^2).^0.5); phi(r,c)=phi(r,c)./57.3; x=x+0.1; end y=y+0.1; end arb=angle(phi); figure(3); imagesc(phi); colormap(gray);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!