以下几行代码产生一个视频,该视频显示高斯光束在倾斜入射且从光纤轴稍微偏移的情况下,产生的多模光纤中的光涡旋:
%% Input parameters for BPM simulation
gridPoints = [200 200];
gridSize = [100 100];
lambda = 1.55;
indexFunction{1} = @(b)
homogeneous(b,200,1);
indexFunction{2} = @(b)
singlecore(b,4800,[50 50],1.46,1.45);
inputField = @(b) gaussinput(b,[15 15],…
‘Shift’,[15 0 200],’Angle’,[5 90]);
%% Create beamProblem
beamProblem = beamset(gridPoints,gridSize,lambda,…
indexFunction,inputField,…
‘Video’,true,’IndexContour’,’all’);
%% Start BPM calculation
bpmData = bpmsolver(beamProblem);