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)
Expert Solution
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
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
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY