MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuale Utente Pagina 281

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 408
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 280
Examples of MAT-Files
6-25
C--------------------------------------------------------------
C $Revision: 1.7 $
C
program matdemo2
C--------------------------------------------------------------
C (integer) Replace integer by integer*8 on the DEC Alpha
C platform.
C
integer matOpen, matGetDir, matGetNextMatrix
integer mp, dir, adir(100), pa
C--------------------------------------------------------------
C
C Other variable declarations here
C
integer mxGetM, mxGetN, matClose
integer ndir, i, stat
character*32 names(100), name, mxGetName
C
C-------------------------------------------------------------
C Open file and read directory.
C-------------------------------------------------------------
C
mp = matOpen('matdemo.mat', 'r')
if (mp .eq. 0) then
write(6,*) 'Can''t open ''matdemo.mat''.'
stop
end if
C
C Read directory.
C
dir = matgetdir(mp, ndir)
if (dir .eq. 0) then
write(6,*) 'Can''t read directory.'
stop
endif
C
C Copy integer into an array of pointers.
C
call mxCopyPtrToPtrArray(dir, adir, ndir)
Vedere la pagina 280
1 2 ... 276 277 278 279 280 281 282 283 284 285 286 ... 407 408

Commenti su questo manuale

Nessun commento