概述
%%%%%%%已知波长(m) , π 电场(V/m)%%%%%%%%%%%%%%%%%%%%%%%%%%%%
B=632.8*10^-9; W=3.14; E0=0.9*10^5;
%%%%%%%%%%变量 %%%%%
T=[0:1:300];
%%%%%%%%%%%%LiNbO3结构参数%%%%%%%%%%%
r=0.025;%%%%%PPLN长度(m)%%%%%
L=0.00075;%%%%%正极长度(m)%%%%
D=0.75;%%%%占空比系数%%%%
M=L/D;%%%%极化周期%%%%
m=2;%%%%%准相位匹配阶数%%%%%
kg=2*W*m/M;%%%周期极化晶体的倒格矢%%%
A10=0 ;A20=1;
Gm=(1-cos(2*W*m*D)+i*sin(2*W*m*D))/(i*W*m); G0=2*D-1;
k0=2*W/B; %%%%%%%入射光波矢%%%%%
%%%%%%%%%%%%%%%%%%%%%%o光和e光折射率%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
n1=sqrt(4.9130+(1.173*10^5+1.65*10^-2*T^2)/(B^2-(2.12*10^2+2.7*10^-5*T^2)^2)-2.78*10^-8*B^2);
n2=sqrt(4.5567+2.605*10^-7*T^2+(0.970*10^5+2.70*10^-2*T^2)/(B^2-(201+5.4*10^-5*T^2)^2)-2.24*10^-8*B^2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%LiNbO3有效电光系数%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%非零电光系数%%%%%%%%%%%%%
r112=-3.4;r121=-3.4;r211=-3.4;
r113=8.6;r223=8.6;
r222=3.4;
r333=30.8;
r232=28;r322=28;r131=28;r311=28;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X=W/4;%%%波矢XY面投影与X轴夹角%%%%
Z=W/4;%%%波矢ZY面投影与Z轴夹角%%%
a1=sin(X);a2=-cos(X);a3=0;
b1=-cos(Z)*cos(X);b2=-cos(Z)*sin(X);b3=sin(Z);
c1=0;c2=0.5*sqrt(2);c3=0.5*sqrt(2);%%%%电场水平于YZ平面且与Z轴成45 角方向传播%%%%
%%%%非零电光系数为r112,r121,r211,r113,r223,r222,r333,r232,r322,r131,r311%%%%
%%%%%%%%%%%因为a3和c1项不存在,分别对有效电光系数reffx作考虑%%%%%
%%%%%%%%%reff1(abc),不考虑r3xx和rxx1项,所以最终存在项为r112,r113,r223,r222,r232,r322%%%%%%
%%%%%%%%%reff2(aac),不考虑r3xx,rx3x,rxx1项,最终存在项为r112,r113,r223,r222,r322%%%
%%%%%%%%%reff3(bbc),不考虑rxx1项,最终存在项为r112,r113,r223,r222,r333,r232,r322%%%%
reff1=0.5*k0*(n1^3)*E0*(a1*r112*b1*c2+a1*r113*b1*c3+a2*r223*b2*c3+a2*r222*b2*c2+a2*r232*b3*c2+a3*r322*b2*c2);
reff2=0.5*k0*(n1^3)*E0*(a1*r112*a1*c2+a1*r113*a1*c3+a2*r223*a2*c3+a2*r222*a2*c2+a3*r322*a2*c2);
reff3=0.5*k0*(n1^3)*E0*(b1*r112*b1*c2+b1*r113*b1*c3+b2*r223*b2*c3+b2*r222*b2*c2+b3*r333*b3*c3+b2*r232*b3*c2+b3*r322*b2*c2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%耦合方程组参数%%%%%%%%%%%
k1=n1*k0; k2=n2*k0;
K=(k0*r1*E0)/(2*sqrt(n1*n2)); V1=(k0*r2*E0)/(2*n1); V2=(k0*r3*E0)/(2*n2);
Kq=K*Gm; V1q=V1*G0; V2q=V2*G0;
k=abs(k2-k1)+kg;%%%%%%%相位失配量%%%%
%%%%%%%%%%%电光效应耦合波方程组解析解%%%%%%%%%%%%
z1=0.5*sqrt((k+V1q-V2q)^2+4*Kq*conj(Kq));
z2=0.5*(V2q-V1q-k);
z3=0.5*(k-V1q-V2q);
P1=sqrt(A10^2*cos(z1*r)^2+((z2*A10-Kq*A20)/z1)^2*sin(z1*r)^2);
O1=angle(A10*cos(z1*r)+i*(z2*A10-Kq*A20)/z1*sin(z1*r));
P2=sqrt(A20^2*cos(z1*r)^2+((z2*A20-conj(Kq)*A10)/z1)^2*sin(z1*r)^2);
O2=angle(A20*cos(z1*r)+i*(-1*z2*A20-conj(Kq)*A10)/z1*sin(z1*r));
A1=P1*exp(i*z3*r+i*O1)
A2=P2*exp(i*(z3-k)*r+i*O2);
%%%%%%%%%%%%%%%%%%%转换效率%%%%%%%%%%%%%%%%%%
effic=abs(A2)/abs(A1);
plot(T,effic,'k')
能帮我看看怎么运行不对么。运行出现
??? Error using ==> mpower
Matrix must be square.
天天在线等,我QQ:47350786.
会的大哥帮帮我
T参量我格式写错了。现在用for语句改写了,能运行结果,但是不出现图形是什么原因呢。
修后的程序我给出了
[本帖最后由 zczc1986 于 2009-5-10 20:07 编辑]
2009-5-10 18:49 上传
点击文件名下载附件
3.01 KB, 下载次数: 11
2009-5-10 20:07 上传
点击文件名下载附件
3.03 KB, 下载次数: 15
最后
以上就是谨慎溪流为你收集整理的matlab中的mpower,求助,Matlab程序运行Error using ==> mpower的全部内容,希望文章能够帮你解决matlab中的mpower,求助,Matlab程序运行Error using ==> mpower所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复