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

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 408
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 270
Examples of MAT-Files
6-15
pa2 = matGetArray(pmat, "GlobalDouble");
if (pa2 == NULL) {
printf("Error reading existing matrix GlobalDouble\n");
return(EXIT_FAILURE);
}
if (!(mxIsFromGlobalWS(pa2))) {
printf("Error saving global matrix: result is not global\n");
return(EXIT_FAILURE);
}
pa3 = matGetArray(pmat, "LocalString");
if (pa3 == NULL) {
printf("Error reading existing matrix LocalDouble\n");
return(EXIT_FAILURE);
}
status = mxGetString(pa3, str, sizeof(str));
if(status != 0) {
printf("Not enough space. String is truncated.");
return(EXIT_FAILURE);
}
if (strcmp(str, "MATLAB: the language of technical
computing")) {
printf("Error saving string: result has incorrect
contents\n");
return(EXIT_FAILURE);
}
/* clean up before exit */
mxDestroyArray(pa1);
mxDestroyArray(pa2);
mxDestroyArray(pa3);
if (matClose(pmat) != 0) {
printf("Error closing file %s\n",file);
return(EXIT_FAILURE);
}
printf("Done\n");
return(EXIT_SUCCESS);
}
Seitenansicht 270
1 2 ... 266 267 268 269 270 271 272 273 274 275 276 ... 407 408

Kommentare zu diesen Handbüchern

Keine Kommentare