--- a/SVDLib1.def
+++ b/SVDLib1.def
@@ -46,7 +46,7 @@
(* *)
(* M : Number of equations *)
(* N : Number of unknowns *)
- (* A : M x N Matrix for which the SVD shall be computed *)
+ (* A : N x M Matrix for which the SVD shall be computed *)
(* sv : Singular values *)
(* U : M x N Matrix of left hand vectors *)
(* tol : threshold for regaring a singular value as zero *)
@@ -176,7 +176,6 @@
(* r2 : calculated sum of squares of residuals devided by M *)
(* *)
(* Getestet mit PowSVD, JacobiSVD, dSVD & dSVDc *)
- (* *)
(*----------------------------------------------------------------*)
PROCEDURE GivSVD( M,N : INTEGER;
@@ -390,7 +389,7 @@
PROCEDURE MinFit( M,N : INTEGER;
VAR A : ARRAY OF ARRAY OF LONGREAL;
VAR D : ARRAY OF LONGREAL;
- Nb : INTEGER;
+ nB : INTEGER;
VAR B : ARRAY OF ARRAY OF LONGREAL;
VAR iErr : INTEGER);
@@ -409,15 +408,11 @@
(* *)
(* on input *)
(* *)
- (* nm must be set to the row dimension of two-dimensional *)
- (* array parameters as declared in the calling program *)
- (* dimension statement. note that nm must be at least *)
- (* as large as the maximum of m and n. *)
- (* M is the number of rows of a and b. *)
- (* N is the number of columns of a and the order of v. *)
+ (* M is the number of rows of A and B. *)
+ (* N is the number of columns of A and the order of V. *)
(* A contains the rectangular coefficient matrix of the *)
(* system *)
- (* Ip is the number of columns of b. ip can be zero. *)
+ (* nB is the number of columns of B. nB can be zero. *)
(* B contains the constant column matrix of the system *)
(* if ip is not zero. otherwise b is not referenced. *)
(* *)
@@ -432,24 +427,22 @@
(* error exit is made, the singular values should be *)
(* correct for indices ierr+1,ierr+2,...,n. *)
(* t *)
- (* B has been overwritten by u b. if an error exit is made, *)
+ (* B has been overwritten by u b. If an error exit is made, *)
(* t *)
- (* the rows of u b corresponding to indices of correct *)
+ (* the rows of U B corresponding to indices of correct *)
(* singular values should be correct. *)
- (* ierr is set to *)
+ (* iErr is set to *)
(* zero for normal return, *)
(* k if the k-th singular value has not been *)
(* determined after 30 iterations. *)
- (* rv1 is a temporary storage array. *)
- (* *)
- (* this version dated august 1983. *)
+ (* *)
+ (* This version dated august 1983. *)
(* *)
(* Please not that the memory organization for matrix B is *)
- (* B[1..M,1..IP] *)
+ (* B[1..M,1..nB] *)
(* *)
(* Adaption nach Modula-2 von Michael Riedl, July 2016 *)
(*----------------------------------------------------------------*)
-
PROCEDURE BerLsg(VAR M,N : INTEGER;
IP : INTEGER;