L33=-r2*sin(theta2);L34=r2*cos(theta2);L63=rq3*sin(theta3);L64=rq3*cos(theta3);L66=(r3-rq3)*sin(theta3);L67=(r3-rq3)*cos(theta3);L= [1 0 1 0 0 0 0 0;0 1 0 1 0 0 0 0;0 0 0 0 1 0 0 0;0 0 -1 0 0 1 0 0;0 0 0 -1 0 0 1 0;0 0 0 0 0 0 0 0;0 0 0 0 0 -1 0 0;0 0 0 0 0 0 1 -1]for i=1:length(t); %For loop will go through every single value of t and will input every value of L33, L34,L63,L64,L66 and L67 to L matrix
L(3,3)=L33(i) L(3,4)=L34(i) L(6,3)=L63(i) L(6,4)=L64(i) L(6,6)=L66(i) L(6,7)=L67(i) end
So that's the part of my code that I need to fix. The theta values in L33, L34, L63, L64, L66, and L67 depend of t, which is the vector: t=[0:0.1:60]. I got the code to output all the different values of the matrix L with respect to the values of t. However, everytime the loop runs, L is overran and I don't know how to save all the matrices.
Best Answer