Professional Documents
Culture Documents
Quiz 1
Quiz 1
College of Engineering
Department of Mechanical Engineering
Q.1 The shear force, V, and bending moment, M, of the beam shown is given as follows:
a) Plot the shear force (V) and the bending moment (M) diagrams arranged vertically in one
figure for the interval 0 ≤ x ≤ 10 m.
b) Find the value of x at which the shear is zero (V = 0) and find the corresponding bending
moment (M).
The specific values of a and b are given in separate excel sheet.
Q.2 Find the centroid of the shaded area shown below. The area is bounded between x = 0
and x = 2 m. The specific value of k is given in a separate excel sheet.
Q1)
a)
function [v]=q1_(x)
a=3.35;
b=4.65;
>> x=linspace(0,10);
>> n=length(x);
>> v=zeros(1,n);
v(i)=q1_(x(i));
end
>> plot(x,v)
b)
function [m]=q1_2(x)
a=3.35;
b=4.65;
>> x=linspace(0,10);
>> n=length(x);
>> m=zeros(1,n);
m(i)=q1_2(x(i));
end
>> plot(x,m)
>>
Q2)
a=0;
b=2;
y1=@(x) sqrt(2.*x);
y2=@(x) 0.27.*x;
A=integral(@(x)y1(x)-y2(x),a,b);
Qx=integral(@(x) x.*(y1(x)-y2(x)),a,b);
xb=Qx/A
Qy=integral(@(x)(y1(x)).^2-(y2(x).^2),a,b)/2;
yb=Qy/A
>> q1_quiz1
xb =
1.1661
yb =
0.8947