Azzera filtri
Azzera filtri

appending to a file

1 visualizzazione (ultimi 30 giorni)
Tor Fredrik Hove
Tor Fredrik Hove il 24 Ott 2011
I first created a file:
>> fid=fopen('mongiss.lib', 'w')
fid =
9
>> matrix=[1:3; 4:6]
matrix =
1 2 3
4 5 6
>> fprintf(fid, '%d %d\n',matrix)
ans =
12
>> fclose(fid)
ans =
0
>> load mongiss.lib
>> mongiss.lib
??? Attempt to reference field of non-structure array.
>> mongiss
mongiss =
1 4
2 5
3 6
Then I tried to open it for appending without sucsess:
>> fid=fopen('mongiss.lib'. 'a')
??? fid=fopen('mongiss.lib'. 'a') | Error: Unexpected MATLAB operator.
What is wrong?

Risposta accettata

TAB
TAB il 24 Ott 2011
fid=fopen('mongiss.lib','a')

Più risposte (0)

Categorie

Scopri di più su Language Fundamentals in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by