Fix my MATLAB code. % Define unknown quantities
Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
Related questions
Question
Fix my MATLAB code.
% Define unknown quantities in x-y system
% abc = Acceleration of B wrt C on beam CD in i direction
% vbc = Velocity of B wrt C on beam CD in i direction
% xacd = Angular acceleration of beam CD in k direction
% xvcd = Angular velocity of beam CD in k direction
syms abc vbc xacd xvcd;
% Create Unit Vectors in x-y coordinates
i = [1,0,0];
j = [0,1,0];
k = [0,0,1];
% Create Unit Vectors in X-Y coordinates (R is rotation Matrix)
Theta = 150; % Angle from X-axis to x-axis
R = [[cosd(Theta),-sind(Theta), 0]; ...
[sind(Theta), cosd(Theta), 0]; [0, 0, 1]];
XYZ = R*[i;j;k];
I = XYZ(1,:);
J = XYZ(2,:);
K = XYZ(3,:);
% Set known quantities for Beam AB (no slider connection).
xVab = -2.5*K; % Angular Velocity of Beam AB
xAab = -3*K; % Angular Acceleration of Beam AB
Rba = 0.2*(cosd(135)*I + sind(135)*J ); % Vector from A to B in X-Y
% Calculate velocity and acceleration of point B
% due to rotation of Beam AB (no slider connection).
Vb1 = cross(xVab,Rba);
Ab1 = cross(xAab,Rba) - dot(xVab,xVab)*Rba;
% Set Motion of moving reference frame (x-y wrt X-Y).
xV = xvcd*k;
xA = xacd*k;
% Set Motion of B wrt moving frame (x-y).
Rbc = 0.15*i;
Vbc = vbc*i;
Abc = abc*i;
% Calculate velocity and acceleration of point B
% due to rotation of beam CD (slider connection).
Vb2 = cross(xV,Rbc)+ Vbc;
Ab2 = cross(xA,Rbc) + cross(xV,cross(xV,Rbc)) + 2*cross(xV,Vbc) + Abc;
% Set velocity and acceleration equations equal for point B and solve.
Z = [Vb1(1)-Vb2(1),Vb1(2)-Vb2(2),Ab1(1)-Ab2(1),Ab1(2)-Ab2(2)];
[abc,vbc,xacd,xvcd] = solve(Z(1),Z(2),Z(3),Z(4));
abc = eval(abc)
vbc = eval(vbc)
xacd = eval(xacd)
xvcd = eval(xvcd)
![Problem 5.5: The "quick-return" mechanism consists of a crank AB, slider
block B, and slotted link CD. If the crank has the angular motion shown,
determine the angular motion of the slotted link at this instant.
0-3 rad/s
9rad/s
CD-aco
100 min
30%
300 mm
Figure for Problem #5
Save the program in a file called DynLabProb5_5.m. Once you are sure each
program is working correctly, copy MATLAB's solutions into the bottom of each of
your programs and place "" in front of each line so it will be interpreted by
MATLAB as a comment. Then resave the program with the solution included at the
bottom.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F94cf748e-f80a-422d-8fcc-447f34c3e7e8%2Fd931c2b5-ab54-449c-9353-ed0775f7b781%2Fa1byh82_processed.png&w=3840&q=75)
Transcribed Image Text:Problem 5.5: The "quick-return" mechanism consists of a crank AB, slider
block B, and slotted link CD. If the crank has the angular motion shown,
determine the angular motion of the slotted link at this instant.
0-3 rad/s
9rad/s
CD-aco
100 min
30%
300 mm
Figure for Problem #5
Save the program in a file called DynLabProb5_5.m. Once you are sure each
program is working correctly, copy MATLAB's solutions into the bottom of each of
your programs and place "" in front of each line so it will be interpreted by
MATLAB as a comment. Then resave the program with the solution included at the
bottom.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
![Mechanics of Materials (10th Edition)](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
![Thermodynamics: An Engineering Approach](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
![Mechanics of Materials (10th Edition)](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
![Thermodynamics: An Engineering Approach](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
![Control Systems Engineering](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
![Mechanics of Materials (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
![Engineering Mechanics: Statics](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY