Gathering data in for loop

I would like to call B04 matrix after running the code. For example, I would like to use B04 matrix from the third iteration and B04 matrix from the fourth iteration but I don't know how to code it. In the for loop, only B04(1,4) and B04(2,4) change in the for loop.
t= linspace(0,2*pi,42);
B04 = [1 0 0 6.5+3.5; 0 1 0 0; 0 0 1 0 ; 0 0 0 1];
B04_initial = B04;
B = [0 0 0 ; 0 0 0 ; 1 1 1];
q_0_raw = rda_planar_RRR(dh,B04_initial);
q_initial = [q_0_raw(1,2) q_0_raw(1,3) q_0_raw(1,4)];
q = q_initial;
timer = 0;
delS = zeros(4,1);
J = zeros(6,3);
for i = t;
B04(1,4) = 6.5+3.5*cos(i);
B04(2,4) = 0+3.5*sin(i);
B04(i) = [1 0 0 B04(1,4);0 1 0 0+B04(2,4); 0 0 1 0 ; 0 0 0 1]
end

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by