Matlab code for otto cycle
Objective: Matlab code for otto cycle to plot PV diagram and to outputthe thermal efficiency clear allclose allclc %inputs%gamma=1.4t3=2000 %state-1 variables%p1=101325t1=500 % Engine geometric parameters %bore=0.11;stroke=0.14;con_rod_length=0.15;cr=12 % calculating the clearance and swept volumes%vol_swept = (pi)/4*(bore)^2*strokevol_clearance…