Program using MATLAB to solve Otto cycle plot p-v diagram calculate efficiency
Objective: %otto cycleclear allclose allclc %inputgamma=1.4;p1=101325;t3=2300; %engine kinematics %compression ratiocr=12; %bore (m)bore=0.1; %stroke (m) stroke=0.1; con_rod=0.15; %swept volumev_s=pi*bore^2*stroke/4; %clearance volumev_c=v_s/(cr-1); %state point1v1=v_c+v_s;t1=500;%state point2v2=v_c;p2=p1*cr^gamma;t2=t1*cr^(gamma-1);…