- #1
bugatti79
- 794
- 1
Hi Folks,
This loop code is working fine but I would like to simplify it further. Can anyone help?
Basically, i need syntax to automate the numbers highlighted in bold.
k is a 3*3 matrix, SE_ans is a 3*1 vector, A is a 3*3 identify matrix. The rests are just constants.
Thanks
This loop code is working fine but I would like to simplify it further. Can anyone help?
Basically, i need syntax to automate the numbers highlighted in bold.
k is a 3*3 matrix, SE_ans is a 3*1 vector, A is a 3*3 identify matrix. The rests are just constants.
Code:
for i=1:size(k,1)
k([B]1[/B],i)=subs(SE_ans([B]1[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]1[/B],i)=subs(SE_ans([B]1[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]1[/B],i)=subs(SE_ans([B]1[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]2[/B],i)=subs(SE_ans([B]2[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]2[/B],i)=subs(SE_ans([B]2[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]2[/B],i)=subs(SE_ans([B]2[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]3[/B],i)=subs(SE_ans([B]3[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]3[/B],i)=subs(SE_ans([B]3[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
k([B]3[/B],i)=subs(SE_ans([B]3[/B],:),[theta_1, theta_2, theta_3, k_t1,k_t2,k_t3],[A(i,[B]1[/B]), A(i,[B]2[/B]), A(i,[B]3[/B]),1,2,3])
end
Thanks