How can I implement the 3*3 matrix in a for loop?
Show older comments
Accepted Answer
More Answers (1)
Andrei Bobrov
on 31 Mar 2017
Edited: Andrei Bobrov
on 31 Mar 2017
x = (1:3)';
y = (2:4)';
z = (6:8)';
n = 5;
m = numel(x);
a = [x,y,ones(m,1)];
lhs = a.'*a;
lhs(end) = n;
rhs = a.'*z;
abc = lhs\rhs;
Categories
Find more on Loops and Conditional Statements 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!