Error using * Inner matrix dimensions must agree.

1 view (last 30 days)
Lpce
Lpce on 5 Jan 2016
Edited: Stephen23 on 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)

Answers (1)

Torsten
Torsten on 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.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!