Anyone can help me ?
How can i fix this?There is error in line 23
% this program computes and plots the exact cylinder volume
clear();r = 8; % compression ratio
s = 100; % stroke (mm)
b=s; %bore=stoke
len= 150; %connecting rod length (mm)
Vd= b^2*s*pi/4; %displacement volume
Vc=Vd/(r-1) %clearence volume
a=s/2; % radius of crank shaft
theta=-180:1:180; %crankangle theta vector
y =len+a-((len^2-a^2*sind(theta).^2).^(1/2) +a*cosd(theta)); % .^2).^ nokta istiyor exact
vol= Vc+y*b^2*pi/4; % exact volume
syms thetadvdtheta=voldiff(dvdtheta) %dv /dtheta
%plot results
figure;plot(theta,diff(dvdtheta),'--','linewidth',2);xlabel('Crank Angle (deg)','fontsize', 18);ylabel('dv/dtheta mm3','fontsize', 18);axis ([-200 200 -1000000 1000000])legend( 'dv/dtheta','Location', 'North');
Best Answer