Hi All,
I've been trying to implement a for loop to obtain different values of the following matrix (T_x_new), it's working perfect till obtaining normal T_x_new, so I just would like to add different theta for T_x_new to check different values but it's not working
Would any one mind helping me to run this code:
clear all; syms l1 m1 n1 l2 m2 n2 l3 m3 n3 theta real;T_x= [l1^2 m1^2 n1^2 2*m1*n1 2*l1*n1 2*l1*m1; l2^2 m2^2 n2^2 2*m2*n2 2*l2*n2 2*l2*m2; l3^2 m3^2 n3^2 2*m3*n3 2*l3*n3 2*l3*m3; l2*l3 m2*m3 n2*n3 m2*n3+n2*m3 l2*n3+n2*l3 l2*m3+m2*l3; l1*l3 m1*m3 n1*n3 m1*n3+n1*m3 l1*n3+n1*l3 l1*m3+m1*l3; l1*l2 m1*m2 n1*n2 m1*n2+n1*m2 l1*n2+n1*l2 l1*m2+m1*l2];T_x_new=subs(T_x,{l1,m1,n1,l2,m2,n2,l3,m3,n3},{1,0,0,0,cos(theta),sin(theta),0,-sin(theta),cos(theta)});for i=45:90; theta=i*(pi/180);T_x_new(:,:,i)end
Best Answer