website security

Copyright Wolfgang M. Hartmann.

Last revised: October 2016

List of Content

  1. Extreme Voting Results in Germany
  2. Offering Consulting Service
  3. Dates of CMAT Releases
  4. Wolfgang's Coefficient of Usability of a Software
  5. User Software License Agreement
  6. Warranty
  7. Installation of CMAT
  8. Running CMAT
  9. Some known Problems with CMAT
  10. Data Types in CMAT
  11. Technical Papers
  12. CMAT Newsletters
  13. Things ToDo
  14. New Developments Since Release 3 in Dec. 2002
  15. "Algorithm" by Paul Boggs

I have been working on this software CMAT since 1995 when my wife went for work to New Orleans and I felt lonely in Raleigh NC. Here is a small summary of the history, content, and features of CMAT.

Since September 28, 2016, there is a new version of CMAT ready for download from the web. This is probably the most bug and error free version of the last five releases. There are maybe still a very few minor things I could fix, maybe at the end of this year 2016. Due to another and more urgent project, I must have a break in coding CMAT starting Oktober 2016. For a 73 year old it will not be easy to continue the CMAT coding in summer of 2017.

Extreme Voting Results in Germany

There are five new papers available describing some outlier analysis of the voting behavior during the Unfortunately, due to specific demand, these papers are all written in German. The methods of uncovering fraud are based on the assumption that it is recognizeable as an outlier and will not be successful wherever fraud is a general feature.

Offering Consulting Service

Dates of CMAT Releases

  1. Release 1: 1996 (Copyright February 1997)
  2. Release 2: December 1999
  3. Release 3: December 2002
  4. Release 4: July 2007
  5. Release 5: January 2009
  6. Release 6: November 2011: I'm now developing with MS Visual Studio 2010 (C/C++) and Intel Parallel Studio (Fortran 90)
  7. Release 7: December 2013
  8. Release 8: December 2015
  9. Release 9: September 2016
I'm still looking for some people who want to work with me on this, especially:
  1. Somebody who does some testing of the language and functions. Enters bug reports. Would need to have some Math and Stat background.
  2. Somebody who does some marketing. Would need to know about competing software in Math and Stat (Octave, Matlab, and SAS IML).

WCU: Wolfgang's Coefficient of Usability of Software

Wolfgang defines WCU as the ratio among the number of people who actually use a software (i.e. would be even willing to pay for the use) and the number of people who developed that software. Now, since CMAT has only one developer, the smallest numbers of WCU are 0 and 1, and compared to the high values of WCU for SPSS and SAS (not even thinking of Google and Facebook) CMAT seems to be rather bad. However, quite a number of packages of R don't do much better than CMAT:-)

User Software License Agreement

Please read this license carefully before using the software. By installing or using this software, you are agreeing to be bound by the terms of this license. If you do not agree to the terms of this license, either contact the author or promptly remove the software.
  1. This software may not be distributed to third parties. The free version may only be used for non-profit research and teaching.
  2. Using the software for commercial applications or for profit needs a specific license agreement.
  3. Supply of any part of this software as part of another software requires the separate prior written agreement of the CMAT managers, which may include financial terms.
  4. This software is copyrighted and may not be modified, decompiled, reverse engineered, or disassembled.
  5. Due acknowledgment shall be made of the use of CMAT in research reports or publications.
"everything free comes without guarantee". Patience is expected. The author is grateful for responses by users such as bug reports or proposals for improvement.
At this time there is only a Windows version. A Linux version would be more appropriate and will be out shortly.


The software and manual of CMAT are offered “AS IS” and without warranties as to performance or merchantability. The seller’s and/or redistributors may have made statements about this software. Any such statements do not constitute warranties and shall not be relied on by the user in deciding whether to use this program. This program is offered without any express or implied warranties whatsoever, because of the diversity of conditions and hardware under which this program may be used, no warranty of fitness for a particular purpose is offered. The users of this software are advised to test the program thoroughly before relying on it. The users must assume the entire risk of using the program; any liability of seller, provider or manufacturer will be limited exclusively to product replacement. In no event shall the maker or distributor of CMAT be liable for any loss of profit or any other commercial damage, including but not limited to special, incidental, consequential or other damages in the use, installation and application of CMAT.

On the Installation of CMAT: Last upload date: September 28, 2016

There are two ways of installing CMAT: either you copy the most important files from the download site or copy the complete directory structure from a DVD distributed by the developer. The files from this website represent the most recent but not completely tested version whereas the files on DVD correspond to an earlier, but in general more stable release. The download files are zipped (using the 7z software with the -tzip option so it can be unzipped using the common ZIP software) but needs a password for unzipping which can be obtained from the author on demand (email, LinkedIn).

The following directory structure is highly recommended:

  1. Download and unzip the file (about 6 MB): creating the directory C:/cmat_util containing the directory gnuplot and the files for using 7z which is used by the CMAT function system().
  2. Create directory C:/cmat.
    1. Download into cmat and unzip the file (about 16 MB) creating the subdirectory cmat/com which contains the executable cmat.exe, a number of DLLs, and the message files for the output.
    2. Download into cmat and unzip the file (about 62 MB) creating the following subdirectories:
      • cmat/test with general test examples
      • cmat/tgplt with test examples for plotting
      • cmat/tmicro with test examples for micro array data
      • cmat/tnlp with test examples for optimization (LP and NLP)
      • cmat/tsem with test examples for structural equation modeling, factor analysis, rotation, and IRT modeling
    3. Download into cmat and unzip the file (about 24 MB) creating the directory cmat/data which contains the following subdirectories:
      • mytst is almost empty and would be some good place for users work
      • tdata contains a large number of data sets, many of them used from the test examples. All files have the extension .dat
    4. Download into cmat and unzip the file (about 430 MB!) creating the cmat/save which contains a number of .dob files generated using the obj2fil() function which can be read by the fil2obj() function. These files are used by some applications with very large data sets. This directory is only needed if you use the functions obj2fil() and fil2obj() in your CMAT input.
    5. Download into cmat and unzip the file (about 14 MB) creating the directory cmat/doc which contains a number of pdf files documenting CMAT, including all Newsletters (see also below). The files for this directory can also be accessed directly on the wcmat website.

When e.g. EMACS is installed, CMAT can now be used in command line or batch mode in Windows, preferably in C:/cmat/mytst.

Only when using the Tcl/TK graphical interface, for online documentation Adobe Reader must be installed in a directory Reader (containing files AcroRd32.exe, AcroRd32.dll etc.) preferably at the same hierarchy level as the cmat directory. Then the help("string") function can be used to open the reference manual at the specified term. You may move easily between the more than 400 terms (bookmarks) of the CMAT Reference Manual by clicking the many more hyperlinks. The manual can also be opened at a specific page or for searching a specified term. The Tcl/TK GUI can be used also for accessing the reference manual.

For graphical output (plotting) CMAT has an interface to the gnuplot software. In CMAT you may connect to gnuplot either interactively or in batch mode (running scripts). Most Linux distributions have gnuplot included. For Windows and other OS gnuplot can be downloaded from the internet free of charge, see for example here (There is also a demo gallery.) For some "terminal" output of gnuplot (like SVG, EPSLATEX, and PDF) you may have to download some additional software (SVGViewer, graphixs, etc). An excellent book about gnuplot is: Philip K. Janert, "Gnuplot in Action", Greenwich CT: Manning Publications Co., 2009 Toshihiko Kawano has his "not-so-freqently asked questions" here and here something about gnuplot tricks.

On Running CMAT

CMAT is a scripting language like Matlab or R or SAS/IML. CMAT can be run either in batch mode or interactively with command line input. In MS Windows this can be done either
  1. with one of the two available graphical interfaces, one in Windows and one in Unix style,
  2. or either by calling cmat.exe in a DOS Command window, or using Emacs (and evtl. BASH) in Unix style. See remarks in the CMAT Tutorial document.

It is best to run CMAT (either interactively or in Batch mode) from the mytst, test, tnlp, or tsem directory. The test, tnlp, and tsem directories contain a large number of batch example files all ending with the extension .inp together with the .log and .txt output files. When running those examples, e.g.

cmat tode.inp

you should obtain the same results, but the log file will show the actual date of the execution. Note, that the CMAT input must always be started with a { bracelet for the start of a compound statement. At least one statement (maybe an empty one) must be run before the script is closed by a mstching } bracelet.

You will find more information about downloading and running CMAT in Windows, Linux, and Unix at the download site.

Some known Problems with CMAT

Bugs are usually fixed when they are found. However, patience is expected: If you are aware of any problems with CMAT please contact the developer.

Selected CMAT Documents

The following are .PDF files which are available for download at the download site. Only the Tutorial and the Summary Manual can be downloaded from here. Use the right mouse button for downloading files.

  1. Complete User's Manual (about 18 mb, close to 3000 pages):
    1. User Software License Agreement
    2. Introduction
    3. Installing and Running CMAT
    4. Restrictions and Comparisons
    5. Tutorial: Basic Elements of the CMAT Language
    6. Summary of Operators, Keywords, and Functions
    7. Reference Guide
    8. Some Details
    9. The Bibliography

  2. CMAT Reference Manual(about 14 mb, more than 2000 pages):
    1. Reference Guide
    2. The Bibliography

  3. CMAT Tutorial (about 200 pages):
    1. Introduction
    2. Tutorial: Basic Elements of the CMAT Language
    3. Summary of Operators, Keywords, and Functions
    4. The Bibliography

  4. CMAT Details and Examples:
    1. Details
    2. The Bibliography

  5. CMAT Summary Manual (about 110 pages):
    1. Introduction
    2. Summary of Operators, Keywords, and Functions
    3. The Bibliography
    Here some short guidelines about how to use the hyperref package in LaTeX.


    Please note that the developments reported in the last posted newsletter must not be implemented in the last posted software version on the net or are not much tested and may not work with the software posted at the site.

    Data Types in CMAT

    1. Scalars: (long) int, (double) real, (double) complex, string
    2. Vectors (dense and sparse) for all data types, even mixed
    3. Matrices (dense and sparse) for all data types, even mixed and for some specific matrix types (diagonal, band, symmetric, triangular)
    4. Tensors (dense and sparse) for all data types, even mixed
    5. Lists, where each entry can be scalar, vector, matrix, tensor, list, or struct; entries are referred to by index
    6. Structures (since end of 2015), where each entry can be scalar, vector, matrix, tensor, list, or struct; entries are referred to by compound name
    7. KD Trees (not completely finished, internally only)

    1. An Important Language Extension:
      This two page paper describes a new form of
      matrix literal permitting the input of matrices containing string data without quotes. (Note, for using that unquoted form of string input, matrix literals may not contain white space inside.)
    2. Data Objects in CMAT:
      This paper sketches some aspects of the data objects implemented in CMAT.
    3. Tensor and List Operations in CMAT:
      Many matrix operations have been extended to tensors. However, this paper sketches also some more specific and additional operations for tensors and data lists.

    Some Technical Papers

    The download site also contains a number of technical reports illustrating applications of CMAT:
    1. Semiannual Newsletters Starting 2003
      The CMAT Newsletters report about the progress in the development and illustrate some applications of CMAT.
    2. On the Use of Matrix Language:
      This small paper illustrates the difference between educational and efficient programming. Note, CMAT almost always knows when a matrix is symmetric and takes advantage of this. Also, identity matrices are stored as diagonal matrices. Sparsity in matrices and vectors is detected automatically. Such examples are often found in statistics.
    3. CMAT Code for some Matlab Programs by
      Olvi Mangasarian and Helen Zhang.
    4. Presentation at DAGStat Conference, Bielefeld, March 2007:
    5. Variable Selection Algorithm for Micro Array Data:
      The analysis of gene expression data is currently a very challenging task. However this paper shows that we can use CMAT to find a very small number of genes from 22283 genes of an Affymetrix chip which yields an exact classification of two kinds of cancer.
    6. On the new CFA model improvement algorithm
    7. On the difference of p values for exact logistic regression computed by SAS PROC LOGISTIC, elrm in R, and CMAT.

    Things ToDo

    CMAT was first written for Unix and later for Windows.
    1. Versions for Mac, Linux, and Unix (should be easy since C code is portable, and lex and yacc are native in Unix)
    2. Dynamic binding of C and Fortran users code.
    3. Extending preprocessor commands.

    New Developments Since Release 3 in December 2002