MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Instrukcja Użytkownika Strona 281

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 408
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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)
Przeglądanie stron 280
1 2 ... 276 277 278 279 280 281 282 283 284 285 286 ... 407 408

Komentarze do niniejszej Instrukcji

Brak uwag