00001 /* $Revision: 1.1 $ $Date: 2007/12/11 19:59:58 $ */ 00002 /*========================================================= 00003 * fort.h 00004 * header file for auxilliary routines for conversion 00005 * between MATLAB and FORTRAN complex data structures. 00006 * 00007 * Copyright 1984-2000 The MathWorks, Inc. 00008 *=======================================================*/ 00009 00010 /* 00011 * Convert MATLAB complex matrix to Fortran complex storage. 00012 * Z = mat2fort(X,ldz,ndz) converts MATLAB's mxArray X to Fortran's 00013 * complex*16 Z(ldz,ndz). The parameters ldz and ndz determine the 00014 * storage allocated for Z, while mxGetM(X) and mxGetN(X) determine 00015 % the amount of data copied. 00016 */ 00017 00018 double* mat2fort( 00019 const mxArray *X, 00020 int ldz, 00021 int ndz 00022 ); 00023 00024 /* 00025 * Convert Fortran complex storage to MATLAB real and imaginary parts. 00026 * X = fort2mat(Z,ldz,m,n) copies Z to X, producing a complex mxArray 00027 * with mxGetM(X) = m and mxGetN(X) = n. 00028 */ 00029 00030 mxArray* fort2mat( 00031 double *Z, 00032 int ldz, 00033 int m, 00034 int n 00035 ); 00036 00037