I have the answers and the work done. I cannot figure out how to put it into cod
ID: 3916178 • Letter: I
Question
I have the answers and the work done. I cannot figure out how to put it into code. My work is as follows:
My code is as follows:
%for converting masses to weights
Wc= 9.81*350;
Wd = 9.81*350;
Wa = 9.81*1400;
%for calculate the reactions at the wheels Rb in kg
Mb = 3.75*Wc + 2.05*Wd + 1.2*Wt - (3)(2)A
%for calculate the reactions at the wheels Ra in kg
Fy = 2A-Wc-Wd-Wt+2B
I need the code for MATLAB so that the user can alter the weights of the crate. Thanks in advance
Two crates, each of mass 350 kg, are placed as shown in the bed of a 1400-kg pickup truck. Determine the reactions at each of the two (a) rear wheels A, (b) front wheels B This time when someone uses your program they should have the option of changing the masses of the crates. 1.8 m 1.2 m ,0.75 mExplanation / Answer
The variable Wt is seemd to be mistyped instead of Wa, hence, the required code is:
%=============================================================
% Gravity
g=9.81;
% Mass input from user
Mc=input('Provide mass for C: ');
Md=input('Provide mass for D: ');
Ma=input('Provide mass for A: ');
% Calculation of weights:
Wc = Mc * g;
Wd = Md * g;
Wa = Ma * g;
% As Mb=0, Reaction at A can be calculated as:
A = (3.75*Wc + 2.05*Wd + 1.2*Wa)/(3*2);
% As Fy=0, Reaction at B can be calculated as:
B = -(2*A-Wc-Wd-Wa)/2;
%===============================================================
Hope this helps! If it works, please thumbs up!
In case further clarification, please comment!