open and edit a lvm file (similar to txt file)
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I have a lvm file (labview measurement file) which I open with Notepad or other text editors. So, I hope I can open and edit it as a text file in Matlab as well.
I want to delete the first 20 lines of the file. Could you please advise?
Thanks.
A sample lvm file:
0 Commenti
Risposte (1)
Image Analyst
il 29 Lug 2012
Basically you'll use fopen() (twice once for the input file and once for the output file), then fgets() from the input file 20 times, then loop where you fgets() from the input file, fprintf() to the output file, then fclose() both input and output file. If you want, delete the input file and use copyfile() or movefile() to copy the new file with the 230 missing lines to have the same name as the original input file.
It's pretty obvious so I'm sure you already tried it, but what was the error or unexpected results you encountered?
0 Commenti
Vedere anche
Categorie
Scopri di più su Low-Level File I/O in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!