This solution is outdated. To rescore this solution, sign in.
H = invhilb(n) generates the exact inverse of the exact invhilb(n) gives Hilbert matrix for n less than about 15. For larger n, invhilb(n) generates an approximation to the inverse Hilbert matrix.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 5;
a = [1 0 1 0 1;
0 1 0 1 0;
1 0 1 0 1;
0 1 0 1 0;
1 0 1 0 1];
assert(isequal(a,checkerboard(n)))
|
2 | Pass |
%%
n = 4;
a = [1 0 1 0;
0 1 0 1;
1 0 1 0;
0 1 0 1];
assert(isequal(a,checkerboard(n)))
|
235 Solvers
404 Solvers
Rotate input square matrix 90 degrees CCW without rot90
380 Solvers
1077 Solvers
2633 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!