MATLAB XPC TARGET RELEASE NOTES Guida Utente Pagina 345

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 344
fopen
Open the file for reading and writing. Initially, the file pointer is at
thebeginningofthefile. Themethoddoesnothingifthefiledoes
not already exist.
'w+'
Openthefileforreadingandwriting. Themethodemptiesthefile
first, if the file already exists and has content, and places the file
pointer at the beginning of the file. The method creates the file if
it does not already exist.
'a+'
Open the file for rea ding and appen ding to the file. Initially , the file
pointer is at the beginning of the file. 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.Youuse
file_ID as the first argum ent to the other file I/O methods (such as
fclose, fread,andfwrite).
Examples Open the file dat a.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,andfwrite.
MATLAB
fopen function.
18-21
Vedere la pagina 344
1 2 ... 340 341 342 343 344 345 346 347 348 349 350 ... 530 531

Commenti su questo manuale

Nessun commento