# Forward Kinematics od Differential Robot

r = 1;
w1 = 4;
w2 = 2;
l = 1;

R = [0 -1 0; 1 0 0; 0 0 1];
X = [(r*w1)/2 + (r*w2)/2; 0 ; (r*w1)/(2*l) - (r*w2)/(2*l)];

A = R*X;
disp(A)


I am getting the solution for the matrix as [0; 3; 1] which is exactly what I expect. I would like to input a series of w1 and w2, Lets say I have a data file 1.xlsx and 2.xlsx with ten values each. I want to load 1.xlsx into w1 and 2.xlsx into w2 and get ten answers for X. How can I do that?

2) Write a for loop for extractting individual values from w1 and w2, to perform the necessary computation.