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.
3 views (last 30 days)
Show older comments
%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 Comments
Answers (0)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!