If P = S kN, determine the average shear stress in the pins at A, B, and C. All pins are in double shear, and each has a diameter of 18 mm.
BE 1500 – Fall 2016 HW 5 Due: October 13, 2016 (1:30 P.M.) 1. Write a code for repmat; the only built-in commands you are allowed to use are input, size, and disp. A=input('matrix '); [m,n]=size(A); z=input('replicated rows '); y=input('replicated columns '); for i=1:m for j=1:n B(i:m:z*m,j:n:y*n)=A(i,j); end end disp(B) 4 points 1 point for comments 1 point for setting up outermost loop (1:m) 1 point for setting up innermost loop (1:n) 1 point for correct answer There are other ways to do this code other than what was given; check to see their correct answers. Take off 1 point per built-in function they were not supposed to use. 2. Write your own code to perform matrix multiplication. Recall that to multiply two matrices, the inner dimensions must be the same. [A]mnB]np [C]mp Every element in the resulting C matrix is obtained by: Cij Σ ik kj You code must be a function file and it must check to see if matrix multiplication can be performed on the provided matrices. Test your code for the following conditions: A= 2 -1 7 4 5 3 6 2 5 B= 6 4 2 1 9 -3 A= 2 -1 7 4 5 3 6 2 5 B= 6 4 2 1 9 -3 function [D]=matrix_mult(A,B) if size(A,2)~=size(B,1) error('Dimensions do not