Error using * Inner matrix dimensions must agree.

2 ビュー (過去 30 日間)
Lpce
Lpce 2016 年 1 月 5 日
編集済み: Stephen23 2016 年 1 月 5 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by