External Interfaces/API Reference    
matPutFull

Writes full mxArrays into MAT-files

Fortran Syntax

Arguments
mfp
   Pointer to MAT-file information.

name
   Name of mxArray to write to MAT-file.

m
   Row dimension.

n
   Column dimension.

pr
   Pointer to real part.

pi
   Pointer to imaginary part.

Description

Most MATLAB applications work only with full (nonsparse) mxArrays. This routine provides an easy way to write a full mxArray into a MAT-file. It offers an alternative to matPutMatrix, which does not require use of the mxArray structure.

matPutFull writes the mxArray with dimensions m-by-n, real data pr, and imaginary data pi onto the MAT-file mfp with the specified name.

If the mxArray does not exist on the MAT-file, it is appended to the end. If an mxArray with the same name already exists in the file, the existing mxArray is replaced with the new mxArray by rewriting the file.

Examples

Read the mxArray A from one MAT-file and write it out to another.

Write a simple real mxArray into a MAT-file. Name the mxArray A and the MAT-file foo.mat.

To test, run the second example; then go to MATLAB and enter:


 matOpen matPutMatrix