MATLAB XPC TARGET RELEASE NOTES Guide de l'utilisateur Page 192

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 531
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 191
9 Working with Target PC Files and File Systems
1 Ifyouhavenotalreadydoneso,intheMATLABwindow,typethefollowing
to assign the
xpctarget.fs object to a variable.
fsys=xpctarget.fs;
2 Type
h=fsys.fopen('data.dat');
or
h=fopen(fsys,'data.dat');
This opens the file data.dat f o r reading and assigns the file identifier to h.
3 Type
data2=fsys.fread(h);
or
data2=fread(fsys,h);
This reads the file data.dat and stores the contents of the file to data2.
This content is in the xPC Target file format.
4 Type
fsys.fclose(h);
This closes the file data.dat.
Before you can view o r plot the contents of this file, you must convert the
contents. See “Converting xPC Target File Format Content to D ouble
Precision Data” on page 9-12.
Converting xPC Target File Format Content to Double Precision
Data
The xPC Target software provides the script readxpcfile.m to convert xPC
Target file format content (in bytes) to double precision data representing the
signals and timestamps. T he
readxpcfile.m script takes in data from a file
9-12
Vue de la page 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 530 531

Commentaires sur ces manuels

Pas de commentaire