Error using * Inner matrix dimensions must agree.

1 vue (au cours des 30 derniers jours)
Lpce
Lpce le 5 Jan 2016
Modifié(e) : Stephen23 le 5 Jan 2016
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)

Réponses (1)

Torsten
Torsten le 5 Jan 2016
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.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by