- #1
Neophyte
- 44
- 0
Homework Statement
4 -2 0 -2 | 32
-2 4 -2 0 | 0
0 -2 4 -2 | 0
-2 0 -2 4 | -32So I am trying to have MATLAB come up with the answer for this with a,b,c,d as arbitrary.
Homework Equations
The Attempt at a Solution
I have tried several things the latest being
for i=1:a,
x=eye(a)
for j=1:(b-1),
if i==j
x(i,j) = 0;
h = var*x;
h=h\B;
spread(:,j) = [h];
var is 4 -2 0 -2
-2 4 -2 0
0 -2 4 -2
-2 0 -2 4
previously I had tried to do something with rref() but I keep failing Inf NaN NaN NaN
-4.0000 NaN NaN NaN
-8.0000 -4.0000 -Inf NaN
-12.0000 -8.0000 -4.0000 -Inf
that is the outcome of the posted =/
Am i missing a function that would be useful?
I just want to hardcode the answer in
The answer I wanted was
0 4
-4 0
-8 -4
12 -8