1
"DEMO FILE FOR PLSQUARES v1.1"$
5
"A simple example of multivariable linear adjustment:"$
6
plsquares(matrix([1,2,0],[3,5,4],[4,7,9],[5,8,10]),[x,y,z],z);
8
"The same example without degree restrictions:"$
9
plsquares(matrix([1,2,0],[3,5,4],[4,7,9],[5,8,10]),[x,y,z],z,1,0);
11
"How many diagonals does a N-sides polygon have? What polynomial degree should be used?"$
12
plsquares(matrix([3,0],[4,2],[5,5],[6,9],[7,14],[8,20]),[N,diagonals],diagonals,5);
13
ev(%, N=9); /* Testing for a 9 sides polygon */
15
"How many ways do we have to put two queens without they are threatened into a n x n chessboard?"$
16
plsquares(matrix([0,0],[1,0],[2,0],[3,8],[4,44]),[n,positions],[positions],4);
17
ev(%[1], n=8); /* Testing for a normal (8 x 8) chessboard */
19
"An example with six dependent variables:"$
20
MTRX:matrix([0,0,0,0,0,1,1,1],[0,1,0,1,1,1,0,0],[1,0,0,1,1,1,0,0],[1,1,1,1,0,0,0,1]);
21
plsquares(MTRX,[a,b,_And,_Or,_Xor,_Nand,_Nor,_Nxor],[_And,_Or,_Xor,_Nand,_Nor,_Nxor],1,0);