clear; clc display('Chung, Karl 660781774') display('Problem 1') display('Part A') A=[3 -3 7 1; -2 6 0 5; 1 4 -3 3; 4 -3 -2 5]; B=inv(A); display('Determanint of A =') det(A) display('Determanint of A^-1 =') det(B) display('Part B') for t=1:1:5 A=[3 -1 6 4 2; 4 3 -2 1 6; -2 -4 5 -3 -2; 7 1 0 5 -1; 3 9 8 -2 4]; B=det(A); A(1,t)=35; A(2,t)=61; A(3,t)=-41; A(4,t)=1; A(5,t)=87; C=det(A); D(t)=C/B; end D'; display('X1=') D(1,1) display('X2=') D(1,2) display('X3=') D(1,3) display('X4=') D(1,4) display('X5=') D(1,5) display('Problem 2') for theta=0:1:90 n=[0 0 1]; raw=[.1*sind(theta) -.1*cosd(theta) 0]; Fw=[0 -9.81*20 0]; rac=2*raw; cd=[.2-.2*sind(theta) .1+.2*cosd(theta) .125]; CD=cd/norm(cd); %CD = force vector of wire wcross=cross(raw,Fw); Mw=dot(wcross,n); tcross=cross(rac,CD); Mt=dot(tcross,n); T=-Mw/Mt; M(theta+1)=T/9.81; g10(theta+1)=10; end figure(1) plot(0:1:90,M) xlabel('Theta Degrees') ylabel('Mass (kg)') title('Mass Required for Equilibrium') w=abs(g10-M); display('For mass of 10kg') [diff_w,theta]=min(w) display('Problem 3') hold off Theta=[0] Wc=12000; Wb=600; Wl=3600; A=zeros([0]) for theta=0:1:800 Theta(1,theta+1)=theta/10; d(1,theta+1)=(9*Wc-12*Wb*cosd(theta/10)-25*cosd(theta/10)*Wl)/(Wc+Wl+Wb); alpha=90-(theta/10); beta=(theta/10)-atand((25*sind(theta/10)-6)/(14+25*cosd(theta/10))); tens=(sind(alpha)*(12*Wb+25*Wl)-25*sind(beta)*Wl)/(24*sind(beta)); G=theta/10-beta; Ax=tens*cosd(G); Ay=Wb+Wl+tens*sind(G); B=[Ax, Ay]; Ar(1,1+theta)=norm(B); W(1,1+theta)=(8*Wc-(12*cosd(theta/10)+1)*Wb)/(25*cosd(theta/10)+1); end figure(2) plot(Theta,d) xlabel('Theta Degrees') ylabel('Distance (ft)') title('Location of resultant force') figure(3) plot(Theta,Ar) xlabel('Theta Degrees') ylabel('Reaction at A (lb)') title('Reaction at A as a function of Theta') % Problem 4 hold on disp('Problem 4') for a=5:1:500 ac(1,a)=a; p(1,a)=(4750*a)/(800-a); b(1,a)=(1583.33*a)/(800-a); end figure(4) plot(ac,p) xlabel('Location of A (mm)') ylabel('Force (N)') title('Minimum force required to prevent motion') figure(5) plot(ac,b) xlabel('Location of A (mm)') ylabel('Force (N)') title('Minimum force required to prevent motion')