How do I do a summation of n 6x6 matrices?
Show older comments
OK, so I am trying to take data from the surface of an object and fit an ellipsoid to it (ref: A LOWER BOUND ON THE VARIANCE OF ALGEBRAIC ELLIPSOID-FITTING CENTER ESTIMATOR, Jai Li, 2006). This process requires me to do the following type of procedure for matrices:
S = summation(i=1 to n) transpose(mi1)*mi1
where mi1 is a 1x6 matrix with numerical data.
Thus, if I just call my data from an excel sheet and say something like:
for i=1:370
mi1 = [x2(i) y2(i) z2(i) xy(i) xz(i) yz(i)];
S11 = transpose(mi1)*mi1;
end
then I am just going to end up getting 370 6x6 matrices. If I say:
S11 = sum(transpose(mi1)*mi1);
then I just get the sum of the rows for each of the 370 matrices.
I want my end result to be a single 6x6 matrix that follows the form originally stated by the summation:
S = summation(i=1 to n) transpose(mi1)*mi1
I'm a little stuck with this and any help would be greatly appreciated!
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!