MATLAB XPC TARGET 4 - API GUIDE Guide de l'utilisateur Page 268

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 372
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 267
fopen
14-24
14fopen
Purpose Open target PC file for reading
Syntax MATLAB command line
file_ID = fopen(file_obj,'file_name')
file_ID = file_obj.fopen('file_name')
file_ID = fopen(file_obj,'file_name',permission)
file_ID = file_obj.fopen('file_name',permission)
Arguments
Description Method of xpctarget.fs objects. From the host PC, opens the specified
filename on the target PC for binary access.
The permission argument values are
'r' to open the file for reading (default)
'w' to open the file for writing. The method creates the file if it does not
already exist.
You cannot have more than eight files open in the file system. This method
returns the file identifier for the open file in
file_ID. You use file_ID as the
first argument to the other file I/O methods (such as
fclose, fread, and
fwrite).
Examples Open the file data.dat in the target PC file system object fsys. Assign the
resulting file handle to a variable for reading.
h = fopen(fsys,'data.dat') or fsys.fopen('data.dat')
ans =
2883584
d = fread(h);
See Also xPC Target file object methods fclose, fread, and fwrite.
MATLAB
fopen function.
file_obj
Name of the xpctarget.fs object.
'file_name'
Name of the target PC to open.
permission
Values are 'r' or 'w'. This argument is optional
with
'r' as the default value.
Vue de la page 267
1 2 ... 263 264 265 266 267 268 269 270 271 272 273 ... 371 372

Commentaires sur ces manuels

Pas de commentaire