Hello all, i am trying to calculate a bunch of matrices using a for loop. I have written the following code
T = 60;for t = 60:60:12940 phi(:,t) = [(n1(1,t+T)-n2(1,t+T)) / (n1(1,t)-n2(1,t)), (n3(1,t+T)-n4(1,t+T)) / (n3(2,t)-n4(2,t)); (n1(2,t+T)-n2(2,t+T)) / (n1(1,t)-n2(1,t)), (n3(2,t+T)-n4(2,t+T)) / (n3(2,t)-n4(2,t))];end
i am getting an error code that says the left side of the equation is a 2-by-1 and the right side is a 2-by-2. both sides of the equation are supposed to be a 2-by-2!
How would i go about writing the left side of the eqution so it would work with the for loop and result in a 2-by-2?
Thanks for any help!
Best Answer