RosettaCodeData/Task/QR-decomposition/Zkl/qr-decomposition.zkl
2023-07-01 13:44:08 -04:00

8 lines
266 B
Text

var [const] GSL=Import("zklGSL"); // libGSL (GNU Scientific Library)
A:=GSL.Matrix(3,3).set(12.0, -51.0, 4.0,
6.0, 167.0, -68.0,
4.0, 24.0, -41.0);
Q,R:=A.QRDecomp();
println("Q:\n",Q.format());
println("R:\n",R.format());
println("Q*R:\n",(Q*R).format());