open and edit a lvm file (similar to txt file)
13 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Image Analyst
on 29 Jul 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 Comments
See Also
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!