Error using * Inner matrix dimensions must agree.

조회 수: 1 (최근 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 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