Translate this MATLAB code to Excel VBA if app.DieselButton.Value = = true if string ( app
No answer yet for this question.
Ask a Tutor
Question:
Translate this MATLAB code to Excel VBA
if app.DieselButton.Value true
if stringappThrottleTypeSwitch.Value "WOT"
if stringappStrokeSwitch.Value
if app.NaturallyAspiratedButton.Value true
DIESEL WOTHROTTLE STROKE NATURALLYASPIRATED
nst;
Vdenvolnoc; displacement volume in m
Vc Vdrc; clearence volume in m
SVdbtspi; stroke length in m
BbtsS; bore length in m
V Vd Vc; v in m
V Vc; v in m
P Prck; p in kPa
T Trck; t in K
mPVRT; m in kg
maafafexrm; mass of air in kg
mfafexrm; mass of fuel in kg
mexexrm; mass of exhaust in kg
TmfhvncmcvT; t in K
PP; p in kPa
VVTT;
VV;
TTVVk; t in K
PPVVk; p in kPa
TlinspaceTT;
TlinspaceTT;
AppiB;
p;
VlinspaceVV;
VlinspaceVV;
PPVVk;
PPVVk;
Qinmfhvnc;
QoutmcvTT;
WmRTTk;
WmRTTk;
WnetWW;
ntTT;
imepWnetVV;
WdotiWnetrpmnstnoc;
UpavgSrpm;
WdotbnmWdoti;
WiWdotinstrpm;
WbWinm;
WfWiWb;
WdotfWdotiWdotb;
bmepnmimep;
Torquebmepenvolnstpi;
BSPWdotbApnoc;
OPDWdotbenvolnoc;
bsfcmfrpmWdotbnoc;
nvmapVd;
VV;
VV;
WPVV;
WPVV;
TT T T T T;
PP P P P P;
VV V V V V V V V;
TTT T;
VV V;
PP P;
TTT T;
VV V;
PP P;
Bore B;
Stroke S;
a Stroke ;
r conrod ;
r ra;
figure
semilogyV VP PcVPbVPrVPgVPy
ylim
xlabelVolume m
ylabelPressure Pa
tethaalinspace;
figure
plottethaaP
titleCrank angle vs pressure'
xlabelCrank Angle'
ylabelpressure
tethablinspace;
figure
plottethabV
titleCrank angle vs Volume'
xlabelCrank Angle'
ylabelVolume
Uones;
Hones;
tetha::;
for tetha::
pistonspeed pisindtethacosdtethasqrtrsindtethaUpavg;
pistonposition acosdtetha sqrtrasindtetha;
Utetha pistonspeed;
Htetha pistonposition;
end
figure
plottethaU
titleCrank angle vs Piston speed'
xlabelCrank Angle'
ylabelPiston speed'
figure
plottethaH
titleCrank angle vs Piston Position'
xlabelCrank Angle'
ylabelPiston Position'
app.OutputValuesTextArea.Valuesprintf Tf K
Tf K
Tf K
Tf K
Pf kPa
Pf kPa
Pf kPa
Pf kPa
Vf m
Vf m
Vf m
V
Related Book For
Corporate Finance
ISBN: 9781265533199
13th International Edition
Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe
Posted Date: