I'm doing a dynamic force analysis problem and i need to determinate forces and torque on a four-bar linkage.
So I wrote a linear system Ax = b , but this is in a for loop (i = 1:360) and the components of A and b change at every step. (see photo)
For matrix A, I thought I need a 9x9 matrix that changes ad every step so,
for i = 1:360
A(9, 9, i) = [ 1,0,-1,0,0,0,0,0,0;
b(9,1,i) = [m2*ag2x(i);
m2*ag2y(i) - W2;
m3*ag3y(i) - W3;
m4*ag4y(i) - W4;
and then calculate x = A\b where x is a 9x1x360, so 360 column vector 9x1;
But matlab tell me "Unable to perform assignment because the indices on the left side are
not compatible with the size of the right side";
I don't know what to do..
Anyone can help me ?
Sorry for my not-so-perfect english.
Thanks in advance,