Binary file size resets to zero after every iteration
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Imtiaz nabi
am 7 Apr. 2022
Bearbeitet: Imtiaz nabi
am 7 Apr. 2022
Hi there,
I am trying to write a binary file containing Intermediate Frequency data. The code needs to run for 30 iterations and at every iteration the binary file resets back to zero... I want it to continue writing to the file while keeping all the previous data in it too... Technically the file size needs to grow and grow and grow but after every iteration it returns back to zero and starts from the beginning.
what should I do?
Here's the code snippet that you might want to check...
The code is too big to be uploaded here so I will post only the desired section here
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 7 Apr. 2022
'w' and 'W' access both request that the content of any existing file is deleted. You need 'a' (append) access.
2 Kommentare
Walter Roberson
am 7 Apr. 2022
'b' access is ignored in MATLAB. MATLAB defaults to binary.
C and C++ default to text access and need you to use 'b' for binary in those languages.
MATLAB defaults to binary and you need to use 't' for text in MATLAB.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!