资源简介
matlab 非线性光学图书中部分例子的源代码,供大家参考
代码片段和文件信息
function u1 = ssprop(u0dtdznzalphabetapgammamaxitertol);
% This function solves the nonlinear Schrodinger equation for
% pulse propagation in an optical fiber using the split-step
% Fourier method.
%
% The following effects are included in the model: group velocity
% dispersion (GVD) higher order dispersion loss and self-phase
% modulation (gamma).
%
% USAGE
%
% u1 = ssprop(u0dtdznzalphabetapgamma);
% u1 = ssprop(u0dtdznzalphabetapgammamaxiter);
% u1 = ssprop(u0dtdznzalphabetapgammamaxitertol);
%
% INPUT
%
% u0 - starting field amplitude (vector)
% dt - time step
% dz - propagation stepsize
% nz - number of steps to take ie ztotal = dz*nz
% alpha - power loss coefficient ie P=P0*exp(-alpha*z)
% betap - dispersion polynomial coefs [beta_0 ... beta_m]
% gamma - nonlinearity coefficient
% maxiter - max number of iterations (default = 4)
% tol - convergence tolerance (default = 1e-5)
%
% OUTPUT
%
% u1 - field at the output
%
% NOTES The dimensions of the input and output quantities can
% be anything as long as they are self consistent. E.g. if
% |u|^2 has dimensions of Watts and dz has dimensions of
% meters then gamma should be specified in W^-1*m^-1.
% Similarly if dt is given in picoseconds and dz is given in
% meters then beta(n) should have dimensions of ps^(n-1)/m.
%
% See also: sspropc (compiled MEX routine)
%
% AUTHOR: Thomas E. Murphy (tem@umd.edu)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2006 Thomas E. Murphy
%
% This file is part of SSPROP.
%
% SSPROP is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version
% 2 of the License or (at your option) any later version.
%
% SSPROP is distributed in the hope that it will be useful but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public
% License along with SSPROP; if not write to the Free Software
% Foundation Inc. 59 Temple Place Suite 330 Boston MA
% 02111-1307 USA
if (nargin<9)
tol = 1e-5;
end
if (nargin<8)
maxiter = 4;
end
nt = length(u0);
w = 2*pi*[(0:nt/2-1)(-nt/2:-1)]‘/(dt*nt);
halfstep = -alpha/2;
for ii = 0:length(betap)-1;
halfstep = halfstep - j*betap(ii+1)*(w).^ii/factorial(ii);
end
halfstep = exp(halfstep*dz/2);
u1 = u0;
ufft = fft(u0);
for iz = 1:nz
uhalf = ifft(halfstep.*ufft);
for ii = 1:maxiter
uv = uhalf .* exp(-j*gamma*(abs(u1).^2 + abs(u0).^2)*dz/2);
uv = fft(uv);
ufft = halfstep.*uv;
uv = ifft(ufft);
if (norm(uv-u12)/norm(u12) < tol)
u1 = uv;
break;
else
u1 = uv;
end
end
if (ii == maxiter)
warnin
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3411 2006-09-14 16:23 ssprop-3.0.1\ChangeLog.txt
目录 0 2006-10-20 16:02 ssprop-3.0.1\examples\
文件 1043 2006-02-10 18:09 ssprop-3.0.1\examples\allexamples.m
文件 658 2006-02-08 10:16 ssprop-3.0.1\examples\fig3_1.m
文件 672 2006-02-08 10:16 ssprop-3.0.1\examples\fig3_3.m
文件 662 2006-02-08 10:17 ssprop-3.0.1\examples\fig3_4.m
文件 675 2006-02-08 10:17 ssprop-3.0.1\examples\fig3_6.m
文件 871 2006-02-08 10:18 ssprop-3.0.1\examples\fig3_7.m
文件 1348 2006-02-08 10:30 ssprop-3.0.1\examples\fig4_10.m
文件 959 2006-02-08 10:31 ssprop-3.0.1\examples\fig4_11.m
文件 941 2006-02-08 10:32 ssprop-3.0.1\examples\fig4_12.m
文件 866 2006-08-22 14:01 ssprop-3.0.1\examples\fig4_14.m
文件 524 2006-02-08 10:33 ssprop-3.0.1\examples\fig4_15.m
文件 1067 2006-02-08 10:34 ssprop-3.0.1\examples\fig4_16.m
文件 816 2006-02-07 13:10 ssprop-3.0.1\examples\fig4_17.m
文件 1317 2006-02-07 13:14 ssprop-3.0.1\examples\fig4_18.m
文件 1058 2006-02-08 10:23 ssprop-3.0.1\examples\fig4_4.m
文件 1087 2006-02-08 10:22 ssprop-3.0.1\examples\fig4_5.m
文件 1590 2006-02-08 10:27 ssprop-3.0.1\examples\fig4_7.m
文件 1589 2006-02-08 10:29 ssprop-3.0.1\examples\fig4_8.m
文件 2647 2006-02-08 10:42 ssprop-3.0.1\examples\fig5_14.m
文件 583 2006-02-07 16:50 ssprop-3.0.1\examples\fig5_15.m
文件 957 2006-02-08 10:43 ssprop-3.0.1\examples\fig5_16.m
文件 1091 2006-02-08 10:45 ssprop-3.0.1\examples\fig5_17.m
文件 1088 2006-02-08 10:45 ssprop-3.0.1\examples\fig5_18.m
文件 914 2006-02-08 10:46 ssprop-3.0.1\examples\fig5_19.m
文件 1648 2006-02-08 10:47 ssprop-3.0.1\examples\fig5_21.m
文件 1069 2006-02-08 10:37 ssprop-3.0.1\examples\fig5_4.m
文件 1326 2006-02-08 10:39 ssprop-3.0.1\examples\fig5_5.m
文件 1077 2006-02-08 10:39 ssprop-3.0.1\examples\fig5_7.m
文件 1291 2006-02-07 16:09 ssprop-3.0.1\examples\fig5_9.m
............此处省略21个文件信息
- 上一篇:GUI的数字识别系统
- 下一篇:MATLAB 画飞机三维运动轨迹工具箱
相关资源
- MATLAB 画飞机三维运动轨迹工具箱
- GUI的数字识别系统
- MATLAB实验报告大全
- 倒立摆matlab仿真模型
- 图像超分辨率处理
- MATLAB数学建模-配书代码
- 结构光超分辨MATLAB代码,测试图像,
- IMAGE_MATLAB_GUI
- MATLAB Text Analytics Toolbox官方教程
- gps基本原理及其matlab仿真199992
- 信号分析与处理——MATLAB语言及应用
- MATLAB编程100例
- 扫描文件的光学字符分割文字分割M
- 交替方向乘子法ADMM算法的matlab代码
- 图像插值方法3种方法,MATLAB代码
- AF、DF协议的MATLAB仿真
- tobii眼动仪视觉追踪程序源码,MATLA
- ADMM工具包
- Matlab实现FCM算法
- matlab 计算李雅普诺夫指数的方法集合
- 多径多普勒效应讲义(含matlab程序)
- 基于Matlab的数字图像处理课程设计
- 雷达系统设计MATLAB仿真.pdf196612
- Matlab 揭秘 全本
- MATLAB建模与仿真应用教程(第2版 )
- 精简版绿色Matlab
- DTFT、DFT、FFT原理及编程
- 无线传感器网络定位程序(matlab可以
- 雷达系统设计及matlab仿真 全文书籍
- 基于matlab图像处理系统含GUI
评论
共有 条评论