makemat (n) returns a zeros square matrix of dimension (n * n)
makemat(0,s,s); == makemat(s);
Code : Tout sélectionner
hilbert_( s ):={
local h, c, r;
h := makemat(0,s,s);
for c from 1 to s do
for r from 1 to s do
h[[r,c]] := 1/(r+c-1);
end;
end;
return h;
}
Code : Tout sélectionner
hilbert_( s ):={
local h, c, r;
h := makemat(s);
for c from 1 to s do
for r from 1 to s do
h[[r,c]] := 1/(r+c-1);
end;
end;
return h;
}
[[1,1/2,1/3],
[1/2,1/3,1/4],
[1/3,1/4,1/5]]