Error using * Inner matrix dimensions must agree.

10 次查看(过去 30 天)
I have inputted the following code and continue to get the error
Error using *
Inner matrix dimensions must agree.
Error (line 16)
mprop1=mpay1*(exp(f1*DeltaV1/vex1 )-1)*(1-finert1 )/(1-finert1*exp(DeltaV1/vex1 ) );
I am not sure where the mistake is any help would be appreciated
g=9.81;
Isp1=290;
Isp2=295;
vex1=g*Isp1;
vex2=g*Isp2;
finert1=0.095;
finert2=0.1;
finert3=0.105;
DeltaV=9000;
f1=linspace(0,1);
DeltaV2=(1-f1)*DeltaV;
DeltaV1=f1*DeltaV;
mpay2=1400
mpay1=50000
mprop2=mpay2*(exp((1-f1).*DeltaV2./vex2 )-1)*(1-finert2)/(1-finert2*exp(DeltaV2./vex2 ) );
mprop1=mpay1*(exp(f1*DeltaV1/vex1 )-1)*(1-finert1 )/(1-finert1*exp(DeltaV1/vex1 ) );
plot(mprop2,f1)

回答(1 个)

Torsten
Torsten 2016-1-5
mprop2=mpay2*(exp((1-f1).*DeltaV2/vex2 )-1)*(1-finert2)./(1-finert2*exp(DeltaV2/vex2 ) );
mprop1=mpay1*(exp(f1.*DeltaV1/vex1 )-1)*(1-finert1 )./(1-finert1*exp(DeltaV1/vex1 ) );
(if this is really what you want)
Best wishes
Torsten.

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by