MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Bedienungsanleitung Seite 273

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 408
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 272
Examples of MAT-Files
6-17
* matClose
* matGetDir
* matGetNextArray
* matGetNextArrayHeader
* matOpen
*
* Copyright (c) 1984-1998 The MathWorks, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include "string.h"
#include "mat.h"
int diagnose(const char *file) {
MATFile *pmat;
char **dir;
int ndir;
int i;
mxArray *pa;
printf("Reading file %s...\n\n", file);
/* Open file to get directory. */
pmat = matOpen(file, "r");
if (pmat == NULL) {
printf("Error opening file %s\n", file);
return(1);
}
/* Get directory of MAT-file. */
dir = matGetDir(pmat, &ndir);
if (dir == NULL) {
printf("Error reading directory of file %s\n", file);
return(1);
} else {
printf("Directory of %s:\n", file);
for (i=0; i < ndir; i++)
printf("%s\n",dir[i]);
}
Seitenansicht 272
1 2 ... 268 269 270 271 272 273 274 275 276 277 278 ... 407 408

Kommentare zu diesen Handbüchern

Keine Kommentare