source: git/Tst/Buch/Example_7_2_6.tst @ 891438c

spielwiese
Last change on this file since 891438c was 891438c, checked in by Gerhard Pfister <pfister@…>, 23 years ago
*GP: initial release git-svn-id: file:///usr/local/Singular/svn/trunk@5579 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 355 bytes
Line 
1LIB "tst.lib";
2tst_init();
3
4proc fitting(matrix M, int n)
5{
6  n=nrows(M)-n;
7  if(n<=0){return(ideal(1));}
8  if((n>nrows(M))||(n>ncols(M))){return(ideal(0));}
9  return(std(minor(M,n))); 
10}
11
12ring R=0,x(0..4),dp;
13matrix M[2][4]=x(0),x(1),x(2),x(3),x(1),x(2),x(3),x(4);
14print(M);
15
16fitting(M,-1);
17
18fitting(M,0);
19
20fitting(M,1);
21
22fitting(M,2);
23
24tst_status(1);$
Note: See TracBrowser for help on using the repository browser.