differentiation of vol for theta

3 views (last 30 days)
Can you show me what is the answer?What is the answer?
dvol/dtheta?
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).^
vol= Vc+y*b^2*pi/4; % exact volume

Accepted Answer

Ameer Hamza
Ameer Hamza on 9 Apr 2020
Edited: Ameer Hamza on 9 Apr 2020
Use gradient to differentiate vol with respect to theta numerically
dvol_dtheta = gradient(vol, theta);
  10 Comments
gultekin karahasan
gultekin karahasan on 9 Apr 2020
Sorry my friend,my experiences are so basic.i dont know how can i use matlab. i started use 2 days ago :(Thank u for helping u are amazing.
Ameer Hamza
Ameer Hamza on 9 Apr 2020
No problem, you will learn with time. I am glad to be of help. You can try this course to get started in MATLAB: https://www.mathworks.com/learn/tutorials/matlab-onramp.html

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!