Im solving the Euler Bernoulli Beam ODE: y'' - Ty/EI = wx(L-x)/2EI with bound y(0) = 0 and y(L) = 0. I determined the coefficents of the y variables but my matrix for the thrid row is all zeros when it should be the same as the second row but shifted a column. I suspect an indexing issue but Im not sure. Also my code for the elements in the product matrix is giving me an index error as well. Any advice is appreciated, heres my code.
b(i+1) = (w*xi(L-xi))/(2*E*I);