I was wondering if anyone knows how to open and read from a file in MATLAB where you begin reading from the end of the file. The file is constantly being updated (at some nonconstant rate between reads) and I want to read the last six lines of the file each time.
I would also to include a test to verify that I don't reread the same lines twice. Each line is formatted as follows (each variable is a floating point number):
timestamp accx accy accz gyrox gyroy gyroz magx magy magz
I was trying to use fseek, to change the position to the last line of the file, but this only allows me to read the last line of the file I think, not read the file backwards unless I specify a certain number of bytes, which I wouldn't know the number of bytes exactly.