matlab出问题 Error using ==> mtimes Inner matrix dimensions must agree.>> clear;h=6.63*10^(-33);v=3.0*10^8/0.000001480;Q12=2.7*10^(-25);Q21=0.77*10^(-25);Q24=0.99*10^(-25);t2=0.0078;t3=0.00003;t4=0.000001;x=10:10^7;R12=x.*Q12/(h*v);R21=x.*Q21/(h*v

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 15:02:39
matlab出问题Errorusing==>mtimesInnermatrixdimensionsmustagree.>>clear;h=6.63*10^(-33);v=3.0*10^8/0.0000

matlab出问题 Error using ==> mtimes Inner matrix dimensions must agree.>> clear;h=6.63*10^(-33);v=3.0*10^8/0.000001480;Q12=2.7*10^(-25);Q21=0.77*10^(-25);Q24=0.99*10^(-25);t2=0.0078;t3=0.00003;t4=0.000001;x=10:10^7;R12=x.*Q12/(h*v);R21=x.*Q21/(h*v
matlab出问题 Error using ==> mtimes Inner matrix dimensions must agree.
>> clear;
h=6.63*10^(-33);
v=3.0*10^8/0.000001480;
Q12=2.7*10^(-25);
Q21=0.77*10^(-25);
Q24=0.99*10^(-25);
t2=0.0078;
t3=0.00003;
t4=0.000001;
x=10:10^7;
R12=x.*Q12/(h*v);
R21=x.*Q21/(h*v);
R24=x.*Q12/(h*v);
c24=4.0*10^(-24);
a=c24*(1+t3*R12);
b=1/t2+R12+R21+t3*R12*R24;
c=-N0*R12;
N2=(-b+sqrt(b^2-4*a*c))/(2*a);
N3=t3*(c24*N2^2+R24*N2);
N1=(N2*R21+N2/t2+c24*N2^2)/R12;
N4=-t4*(c24*N2^2+R24*N2);
N0=N1+N2+N3+N4;
y=N2/N0;
plot(x,y);
Error using ==> mtimes
Inner matrix dimensions must agree.

matlab出问题 Error using ==> mtimes Inner matrix dimensions must agree.>> clear;h=6.63*10^(-33);v=3.0*10^8/0.000001480;Q12=2.7*10^(-25);Q21=0.77*10^(-25);Q24=0.99*10^(-25);t2=0.0078;t3=0.00003;t4=0.000001;x=10:10^7;R12=x.*Q12/(h*v);R21=x.*Q21/(h*v
b=1/t2+R12+R21+t3*R12*R24;
这句话的问题:
R12*R24,有两种乘法,一种是矩阵相乘,应该改成R12*R24‘这种的话,还有一种是按元素相乘,就应该改成R12.*R24.请根据需要自己修改.