Dear Matlab users,
Maybe someone can help me with the following:
For a project I would like to read a certain row of the txt-file constant_file_matlab.txt. In this example I would like to read the 17th row:
n=7M = dlmread('constant_file_matlab.txt','\t',[17 0 17 n-1])
I get the following output:
M = -5 0 15 20 40 250 0
This is the output I would like to see, but the problem is that in some cases the length of this vector will change. I tried the following:
M = dlmread('constant_file_matlab.txt','\t',[17 0 17 end])
but is not working. Therefore my questions is: how can I read one specific row in my txt-file from the first to the last value?
However, ideally I would like to do the same as mentioned above, but with text notes at the end of each row (see txt-file: constant_file_matlab2). Is there a method to read this file with notes row by row?
Thank you.
Best Answer