0% found this document useful (0 votes)
9 views2 pages

Matlab Code

The MATLAB code calculates and plots the vertical and horizontal inertial forces of a V-Twin engine as functions of the angle theta. It uses trigonometric functions to compute the forces and creates three subplots to visualize the vertical, horizontal, and net inertial forces against theta. Each subplot includes labeled axes, titles, and grid lines for clarity.

Uploaded by

modili3593
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Matlab Code

The MATLAB code calculates and plots the vertical and horizontal inertial forces of a V-Twin engine as functions of the angle theta. It uses trigonometric functions to compute the forces and creates three subplots to visualize the vertical, horizontal, and net inertial forces against theta. Each subplot includes labeled axes, titles, and grid lines for clarity.

Uploaded by

modili3593
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MATLAB CODE

theta = linspace(0, 360, 25);

%Vertical Inertial Piston force(N)

FpV = 1184.3525.*cos(pi*theta/180);

%Horizontal Inertial Piston force(N)

FpH=(1184.3525.*(sin(pi*theta/180) +

(2^0.5)*sin(2.*pi*theta/180)./5));

%Net Inertial force in V-Twin engine

%Fp=(FpV^(2)+FpH^(2))^(0.5);

Fp=1184.3525*sqrt(1+0.8.*sqrt(2).*sin(pi*theta/180).*sin(p

i*theta/180).*cos(pi*theta/180).*(1+0.2.*sqrt(2).*cos(pi*t

heta/180)));

subplot(3,1,1);

plot(theta, FpV);

set(gca,'XLim',[0 360]);

set(gca,'XTick',(0:15:360));

xlabel('Theta \newline Fig.2')

ylabel('Vertical Inertial Force')

title('Vertical Inertial Force Vs Theta')

grid on;

subplot(3,1,2);

plot(theta, FpH);

set(gca,'XLim',[0 360]);

set(gca,'XTick',(0:15:360));

xlabel('Theta \newline Fig.3')

ylabel('Horizontal Inertial Force')

title('Horizontal Inertial Force Vs Theta')

grid on;

subplot(3,1,3);

plot(theta, Fp);
set(gca,'XLim',[0 360]);

set(gca,'XTick',(0:15:360));

xlabel('Theta \newline Fig.4')

ylabel('Inertial Force')

title('Inertial Force Vs Theta')

grid on;

You might also like