BLAS1_C is a MATLAB library which implements the Level 1 BLAS, or Basic Linear Algebra Subprograms.
The BLAS are a small core library of linear algebra utilities, which can be highly optimized for various architectures. Software that relies on the BLAS is thus highly portable, and will typically run very efficiently. The LINPACK and LAPACK linear algebra libraries make extensive use of the BLAS.
The Level 1 BLAS are primarily for use in vector operations. In certain cases, they may also be used to operate on the rows or columns of a two-dimensional array.
It is worth questioning whether one should try to implement the Level 1 BLAS in MATLAB: for one thing, the MATLAB language makes it very easy to carry out vector operations, even with nonunit incrementing on the vector indices. Moreover, MATLAB actually makes it more difficult to stick with the syntax of the BLAS, since it is not so easy to make a two dimensional array "look like" a vector.
In particular, if you want to work on a row of a matrix, MATLAB essentially prefers you to make a temporary vector, as in "A(3,1:N)"; in the standard BLAS, you would instead pass the location of the first entry, A(3,1), and an increment, LDA, that will lead to the next entry of the row. This is not easy or natural to do in MATLAB. Still, for consistency, I have gone ahead and tried to make a reasonable effort at implementing the Level 1 BLAS.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
BLAS1_C is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.
BLAS0, a MATLAB library which contains auxilliary functions for the Basic Linear Algebra Subprograms (BLAS).
BLAS1_D, a MATLAB library which contains basic linear algebra routines for vector-vector operations, using double precision real arithmetic.
BLAS1_S, a MATLAB library which contains basic linear algebra routines for vector-vector operations, using single precision real arithmetic.
BLAS1_Z, a MATLAB library which contains basic linear algebra routines for vector-vector operations, using double precision complex arithmetic.
BLAS2, a MATLAB library which contains basic linear algebra subprograms (BLAS) for matrix-vector operations;
BLAS3, a MATLAB library which contains basic linear algebra subprograms (BLAS) for matrix-matrix operations;
LAPACK_EXAMPLES, a FORTRAN90 program which demonstrates the use of the LAPACK linear algebra library.
LINPACK_C, a MATLAB library which solves linear systems using single precision complex arithmetic;
Original FORTRAN77 version by Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh. MATLAB version by John Burkardt.
You can go up one level to the MATLAB source codes.