激光线宽不同表达方式之间的转换 下面是转换激光线宽的Matlab程序(LaserLineWidth.m). 需要知道激光波长(比如632.8 nm); 需要输入线宽用波长, 频率, 或者波数表示的值(只能输入3个中的1个, 其他两个赋值为‐1.) %LaserLineWidth.m%Thisprogramistoconvertlaserlinewidthbetweendifferentforms:%wavelength(nm),frequency(MHz)andwavenumber(cm^-1)%laserlinewavelengthmustbeknown.%Inputoneofthethreeformsoflinewidthonly,leavetheothertwo-1.%Units:wavelength:nm,frequency:MHz,wavenumber:cm^-1clearall;clc;formatlonggcc=3e8;%speedoflightinm/s.lambda=632.8;%wavelengthinnm%Pleaseprovideoneofthefollowing3quantities,leavetheothertwo-1:%%Deltalambda=-1;%linewidthinwavelength(nm)Deltanu=1500;%linewidthinfrequency(MHz=1e6Hz)Deltanubar=-1;%linewidthinwavenumber(cm^-1)%%ifDeltalambda0Deltanu=(cc/lambda^2)*Deltalambda*1e9*1e-6;%use1e9toconvert1/nmto1/m;use1e-6toconvertHztoMHzDeltanubar=(1/lambda^2)*Deltalambda*1e7;%use1e7toconvert1/nmto1/cmendifDeltanu0Deltalamda=(lambda^2/cc)*Deltanu*1e-9*1e6;%use1e-9toconvert1/mto1/nm;use1e6toconvertMHzto1/sDeltanubar=(1/cc)*Deltanu*1e-2*1e6;%use1e-2toconvert1/mto1/cm;use1e6toconvertMHzto1/sendifDeltanubar0Deltalambda=lambda^2*Deltanubar*1e-7;%use1e-7toconvert1/cmto1/nmDeltanu=cc*Deltanubar*1e2*1e-6;%use1e2toconvertmtocm;use1e-6toconvertHztoMHz.endAllLineWidth={'Deltalambda(nm)''Deltanu(MHz)''Deltanubar(cm^-1)';DeltalambdaDeltanuDeltanubar}