以下是一个基于几何相位原理的消色差超透镜位相分布的简单MATLAB代码:
clear; clc;% Define parameters
lambda = 0.6328; % Wavelength (μm)
f = 100; % Focal length (mm)
d = 10; % Diameter of lens (mm)
n = 1.5; % Refractive index
% Generate a meshgrid of x and y coordinates
[x, y] = meshgrid(-d/2:0.1:d/2, -d/2:0.1:d/2);
% Calcu