MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuel d'utilisateur Page 273

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 408
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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]);
}
Vue de la page 272
1 2 ... 268 269 270 271 272 273 274 275 276 277 278 ... 407 408

Commentaires sur ces manuels

Pas de commentaire