Next:
Contents
Contents
FreeMat Help
Version 1.10
Samit Basu
Contents
Introduction
Getting Started
Installing FreeMat from Source
Setting up the FreeMat Path
Note on BLAS - Basic Linear Algebra System
Changes from 1.07 to 1.08
Basic Language
Variables and Arrays
STRUCT Structure Array Constructor
Usage
Example
STRING String Arrays
Usage
MATRIX Matrix Definitions
Usage
Examples
CELL Cell Array Definitions
Usage
Examples
GLOBAL Global Variables
Usage
Example
PERSISTENT Persistent Variables
Usage
Example
INDEXING Indexing Expressions
Usage
Array Indexing
Cell Indexing
Structure Indexing
Complex Indexing
Functions and Scripts
FUNCTION Function Declarations
Usage
Examples
KEYWORDS Function Keywords
Usage
Example
VARARGIN Variable Input Arguments
Usage
Example
VARARGOUT Variable Output Arguments
Usage
Example
SCRIPT Script Files
Usage
Example
NARGIN Number of Input Arguments
Usage
Example
NARGOUT Number of Output Arguments
Usage
Example
SPECIAL Special Calling Syntax
Usage
Example
Mathematical Operators
PLUS Addition Operator
Usage
Function Internals
Examples
MINUS Subtraction Operator
Usage
Function Internals
Examples
DOTTIMES Element-wise Multiplication Operator
Usage
Function Internals
Examples
DOTRIGHTDIVIDE Element-wise Right-Division Operator
Usage
Function Internals
Examples
DOTLEFTDIVIDE Element-wise Left-Division Operator
Usage
Function Internals
Examples
DOTPOWER Element-wise Power Operator
Usage
Function Internals
Examples
COMPARISONOPS Array Comparison Operators
Usage
Examples
LOGICALOPS Logical Array Operators
Usage
Examples
LEFTDIVIDE Matrix Equation Solver/Divide Operator
Usage
Function Internals
Examples
RIGHTDIVIDE Matrix Equation Solver/Divide Operator
Usage
Function Internals
Examples
HERMITIAN Matrix Hermitian (Conjugate Transpose) Operator
Usage
Function Internals
Examples
TRANSPOSE Matrix Transpose Operator
Usage
Function Internals
Examples
POWER Matrix Power Operator
Usage
Function Internals
Examples
COLON Index Generation Operator
Usage
Examples
Flow Control
LASTERR Retrieve Last Error Message
Usage
Example
ERROR Causes an Error Condition Raised
Usage
Example
TRY-CATCH Try and Catch Statement
Usage
Examples
SWITCH Switch statement
Usage
Examples
IF-ELSEIF-ELSE Conditional Statements
Usage
Examples
WHILE While Loop
Usage
Examples
FOR For Loop
Usage
Examples
CONTINUE Continue Execution In Loop
Usage
Example
BREAK Exit Execution In Loop
Usage
Example
RETURN Return From Function
Usage
Example
RETALL Return From All Keyboard Sessions
Usage
Example
KEYBOARD Initiate Interactive Debug Session
Usage
Example
FreeMat Functions
PCODE Convert a Script or Function to P-Code
Usage
TIC Start Stopwatch Timer
Usage
Example
TOC Start Stopwatch Timer
Usage
Example
HELP Help
Usage
SLEEP Sleep For Specified Number of Seconds
Usage
EVAL Evaluate a String
Usage
Example
SOURCE Execute an Arbitrary File
Usage
Example
FEVAL Evaluate a Function
Usage
Example
LOADLIB Load Library Function
Usage
IMPORT Foreign Function Import
Usage
Example
QUIT Quit Program
Usage
BIND Bind Standalone Executable
Usage
Example
EXIT Exit Program
Usage
RESCAN Rescan M Files for Changes
Usage
Debugging FreeMat Code
DBAUTO Control Dbauto Functionality
Usage
DBDELETE Delete a Breakpoint
Usage
DBLIST List Breakpoints
Usage
DBSTEP Step N Statements
Usage
DBSTOP
Usage
Sparse Matrix Support
NNZ Number of Nonzeros
Usage
Example
SPARSE Construct a Sparse Matrix
Usage
FULL Convert Sparse Matrix to Full Matrix
Usage
Example
EIGS Sparse Matrix Eigendecomposition
Usage
Example
SPONES Sparse Ones Function
Usage
Examples
SPEYE Sparse Identity Matrix
Usage
Example
SPRAND Sparse Uniform Random Matrix
Usage
Examples
SPRANDN Sparse Normal Random Matrix
Usage
Examples
SPY Visualize Sparsity Pattern of a Sparse Matrix
Usage
Example
Built In Functions
Mathematical Functions
LOG Natural Logarithm Function
Usage
Function Internals
Example
EXP Exponential Function
Usage
Function Internals
Example
COS Trigonometric Cosine Function
Usage
Function Internals
Example
SIN Trigonometric Sine Function
Usage
Function Internals
Example
TAN Trigonometric Tangent Function
Usage
Function Internals
Example
CSC Trigonometric Cosecant Function
Usage
Function Internals
Example
SEC Trigonometric Secant Function
Usage
Function Internals
Example
COT Trigonometric Cotangent Function
Usage
Function Internals
Example
ACOS Inverse Trigonometric Arccosine Function
Usage
Function Internals
Example
ASIN Inverse Trigonometric Arcsine Function
Usage
Function Internals
Example
ATAN Inverse Trigonometric Arctangent Function
Usage
Function Internals
Example
ATAN2 Inverse Trigonometric 4-Quadrant Arctangent Function
Usage
Function Internals
Example
EXPEI Exponential Weighted Integral Function
Usage
Function Internals
Example
EONE Exponential Integral Function
Usage
Function Internals
Example
EI Exponential Integral Function
Usage
Function Internals
Example
ERFCX Complimentary Weighted Error Function
Usage
Function Internals
Example
ERFC Complimentary Error Function
Usage
Function Internals
Example
ERF Error Function
Usage
Function Internals
Example
DAWSON Dawson Integral Function
Usage
Function Internals
Example
PSI Psi Function
Usage
Function Internals
Example
GAMMA Gamma Function
Usage
Function Internals
Example
GAMMALN Log Gamma Function
Usage
Example
IDIV Integer Division Operation
Usage
Example
LOG10 Base-10 Logarithm Function
Usage
Example
LOG2 Base-2 Logarithm Function
Usage
Example
MOD Modulus Operation
Usage
Example
SQRT Square Root of an Array
Usage
Example
Base Constants
INF Infinity Constant
Usage
Function Internals
Example
NAN Not-a-Number Constant
Usage
Example
I-J Square Root of Negative One
Usage
Example
PI Constant Pi
Usage
Example
E Euler Constant (Base of Natural Logarithm)
Usage
Example
EPS Double Precision Floating Point Relative Machine Precision Epsilon
Usage
Example
FEPS Single Precision Floating Point Relative Machine Precision Epsilon
Usage
Example
TEPS Type-based Epsilon Calculation
Usage
Example
Elementary Functions
MIN Minimum Function
Usage
Function Internals
Example
MAX Maximum Function
Usage
Function Internals
Example
CEIL Ceiling Function
Usage
Example
FLOOR Floor Function
Usage
Example
CUMSUM Cumulative Summation Function
Usage
Function Internals
Example
SUM Sum Function
Usage
Function Internals
Example
MEAN Mean Function
Usage
Function Internals
Example
VAR Variance Function
Usage
Function Internals
Example
CONJ Conjugate Function
Usage
Example
REAL Real Function
Usage
Example
IMAG Imaginary Function
Usage
Example
ABS Absolute Value Function
Usage
Example
PROD Product Function
Usage
Example
STD Standard Deviation Function
Usage
Example
Inspection Functions
CLEAR Clear or Delete a Variable
Usage
Example
WHO Describe Currently Defined Variables
Usage
Example
SIZE Size of a Variable
Usage
Example
ISSET Test If Variable Set
Usage
Example
EXIST Test for Existence
Usage
Example
ISSPARSE Test for Sparse Matrix
Usage
Example
ISNAN Test for Not-a-Numbers
Usage
Example
ISINF Test for infinities
Usage
Example
WHERE Get Information on Program Stack
Usage
Example
WHICH Get Information on Function
Usage
Example
ISEMPTY Test For Variable Empty
Usage
Examples
ISA Test Type of Variable
Usage
Examples
Type Cast Functions
UINT8 Convert to Unsigned 8-bit Integer
Usage
Example
UINT16 Convert to Unsigned 16-bit Integer
Usage
Example
UINT32 Convert to Unsigned 32-bit Integer
Usage
Example
INT8 Convert to Signed 8-bit Integer
Usage
Example
INT16 Convert to Signed 16-bit Integer
Usage
Example
INT32 Convert to Signed 32-bit Integer
Usage
Example
DOUBLE Convert to 64-bit Floating Point
Usage
Example
COMPLEX Convert to 32-bit Complex Floating Point
Usage
Example
DCOMPLEX Convert to 32-bit Complex Floating Point
Usage
Example
TYPEOF Determine the Type of an Argument
Usage
Example
Array Generation and Manipulations
INT2BIN Convert Integer Arrays to Binary
Usage
Example
BIN2INT Convert Binary Arrays to Integer
Usage
Example
UNIQUE Unique
Usage
Example
SORT Sort
Usage
Example
RESHAPE Reshape Array
Usage
Example
ZEROS Array of Zeros
Usage
Example
ONES Array of Ones
Usage
Example
FIND Find Non-zero Elements of An Array
Usage
Example
DIAG Diagonal Matrix Construction/Extraction
Usage
Examples
REPMAT Array Replication Function
Usage
Example
CIRCSHIFT Circularly Shift an Array
USAGE
Example
EYE Identity Matrix
USAGE
Example
FLIPDIM Reverse a Matrix Along a Given Dimension
USAGE
Example
FLIPLR Reverse the Columns of a Matrix
USAGE
Example
FLIPUD Reverse the Columns of a Matrix
USAGE
Example
LENGTH Length of and Array
Usage
Example
LINSPACE Linearly Spaced Vector
Usage
Examples
NONZEROS Retrieve Nonzero Matrix Entries
USAGE
Example
NORM Norm Calculation
Usage
Examples
NUMEL Number of Elements in an Array
Usage
Example
PINV Moore-Penrose Pseudoinverse
Usage
Function Internals
Examples
RANK Calculate the Rank of a Matrix
Usage
Examples
RESHAPE Reshape Array
Usage
Example
SQUEEZE Remove Singleton Dimensions of an Array
Usage
Example
Random Number Generation
SEED Seed the Random Number Generator
Usage
Example
RANDBETA Beta Deviate Random Number Generator
Usage
Function Internals
Example
RANDI Uniformly Distributed Integer
Usage
Example
RANDCHI Generate Chi-Square Random Variable
Usage
Function Internals
Example
RANDEXP Generate Exponential Random Variable
Usage
Function Internals
Example
RANDP Generate Poisson Random Variable
Usage
Function Internals
Example
RANDBIN Generate Binomial Random Variables
Usage
Function Internals
Example
RANDNBIN Generate Negative Binomial Random Variables
Usage
Function Internals
Example
RANDF Generate F-Distributed Random Variable
Usage
Function Internals
Example
RANDGAMMA Generate Gamma-Distributed Random Variable
Usage
Function Internals
Example
RANDMULTI Generate Multinomial-distributed Random Variables
Usage
Function Internals
Example
RANDNCHI Generate Noncentral Chi-Square Random Variable
Usage
Function Internals
Examples
RANDNF Generate Noncentral F-Distribution Random Variable
Usage
Function Internals
Example
RANDN Gaussian (Normal) Random Number Generator
Usage
Function Internals
Example
RAND Uniform Random Number Generator
Usage
Example
Input/Ouput Functions
SETPRINTLIMIT Set Limit For Printing Of Arrays
Usage
Example
GETPRINTLIMIT Get Limit For Printing Of Arrays
Usage
Example
FOPEN File Open Function
Usage
Examples
FCLOSE File Close Function
Usage
Example
FREAD File Read Function
Usage
Example
FWRITE File Write Function
Usage
Example
FTELL File Position Function
Usage
Example
FEOF End Of File Function
Usage
Example
FSEEK Seek File To A Given Position
Usage
Example
SPRINTF Formated String Output Function (C-Style)
Usage
Examples
PRINTF Formated Output Function (C-Style)
Usage
Format of the format string:
The flag characters:
The field width:
The precision:
The conversion specifier:
Example
FGETLINE Read a String from a File
Usage
Example
STR2NUM Convert a String to a Number
Usage
FSCANF Formatted File Input Function (C-Style)
Usage
FPRINTF Formated File Output Function (C-Style)
Usage
Examples
SAVE Save Variables To A File
Usage
Example
LOAD Load Variables From A File
Usage
Example
DISP Display a Variable or Expression
Usage
Example
GETLINE Get a Line of Input from User
Usage
String Functions
STRCMP String Compare Function
Usage
Example
Transforms/Decompositions
FFT (Inverse) Fast Fourier Transform Function
Usage
Function Internals
Example
LU LU Decomposition for Matrices
Usage
Example
EIG Eigendecomposition of a Matrix
Usage
Function Internals
Example
QR QR Decomposition of a Matrix
Usage
SVD Singular Value Decomposition of a Matrix
Usage
Function Internals
Examples
Operating System Functions
CD Change Working Directory Function
Usage
Example
LS/DIR List Files Function
Usage
Example
PWD Print Working Directory Function
Usage
Example
GETPATH Get Current Search Path
Usage
SETPATH Set Current Search Path
Usage
SYSTEM Call an External Program
Usage
Example
Optimization and Curve Fitting
INTERPLIN1 Linear 1-D Interpolation
Usage
Example
FITFUN Fit a Function
Usage
GAUSFIT Gaussian Curve Fit
Usage
Example
POLYFIT Fit Polynomial To Data
Usage
Function Internals
Example
POLYVAL Evaluate Polynomial Fit at Selected Points
Usage
Function Internals
Example
Graphing Functions
Figure Functions
PRINT Print a Figure To A File
Usage
Example
SIZEFIG Set Size of an Fig Window
Usage
FIGURE Figure Window Select and Create Function
Usage
COPY Copy Figure Window
Usage
CLOSE Close Figure Window
Usage
Image Display Functions
COLORMAP Image Colormap Function
Usage
Function Internals
Examples
WINLEV Image Window-Level Function
Usage
Function Internals
Examples
IMAGE Image Display Function
Usage
Example
ZOOM Image Zoom Function
Usage
Example
POINT Image Point Information Function
Usage
COPPER Copper Colormap
Usage
Example
GRAY Gray Colormap
Usage
Example
Plot Functions
XLABEL Plot X-axis Label Function
Usage
Example
YLABEL Plot Y-axis Label Function
Usage
Example
LEGEND Add Legend to Plot
Usage
TITLE Plot Title Function
Usage
Example
GRID Plot Grid Toggle Function
Usage
Example
HOLD Plot Hold Toggle Function
Usage
Function Internals
Example
PLOT Plot Function
Usage
Example
AXIS Plot Axis Set/Get Function
Usage
Function Internals
Example
XLIM Adjust X Limits of plot
Usage
Example
YLIM Adjust Y Limits of plot
Usage
Example
MPI Functions
MPI Functions
MPISEND MPI Send Array
Usage
Function Internals
Example
MPIBARRIER MPI Barrier
Usage
MPIBCAST MPI Broadcast
Usage
MPIRECV MPI Receive Array
Usage
Example
MPICOMMRANK MPI Communicator Rank
Usage
Example
MPICOMMSIZE MPI Communicator Size
Usage
Example
MPIALLREDUCE MPI All Reduce Operation
Usage
MPIREDUCE MPI Reduce Operation
Usage
MPIINITIALIZED MPI Initialized Test
Usage
Example
MPIINIT MPI Initialize
Usage
MPICOMMSPAWN MPI Communicator Spawn
Usage
MPIINTERCOMMMERGE MPI Intercommunicator Merge
Usage
MPICOMMGETPARENT MPI Get Parent Communicator
Usage
MPIFINALIZE MPI Finalize
MPIRUN MPI Process Run
Usage
MPISERVER MPI Process Server
Usage
Samit K. Basu 2005-03-16