0
$\begingroup$
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?

$\endgroup$
1
$\begingroup$

1) Load or import the data that is in your xlsx files into w1 and w2, by using importdata as an array of values.

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.