Question: Write a MATLAB program that has a main code named HW 4 p 2 _ Task 2 _ UCusername.m and two functions Displacement _ UCusername.m
Write a MATLAB program that has a main code named HWpTaskUCusername.m and two functions DisplacementUCusername.m and VelocityUCusername.m
The main code will prompt the user to enter:
o The compressors dimensions L L and L in inch
o The initial crank angle theta in degrees
The rotational speed of the crank in RPM
The main code will convert to
The main code will create array that starts from the angle increments by up to
a full rotation
Then, the main code will call the function DisplacementUCusername.m and pass and
The function DisplacementUCusername.m calculates and returns the arrays and shown in the equations below.
Then, the main code will call function VelocityUCusername.m and pass and
The function VelocityUCusername.m calculates and returns the arrays and shown in the equations below.
The main code will find the minimum and maximum of
The main code will calculate and output the stroke of the piston maxmin
The main code will plot versus on Figure and versus on Figure Add axis
labels with units and titles for both figures.
Hint: Pay close attention to the units for the angles, make sure you are consistent with the
units, use MATLAB Commands sind cosd and asind.
Hint: use command figure before plot command to create Figure and command
figure before the plot command to create Figure
Closed form equations for a slidercrank mechanism :
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
