What’s the simplest way to read datas from a text file into a 1xN integer in MatLab?
I’m writing the data into a text file from a Java program, which means it is highly flexible how the text file could look like. These data are to be plotted (pdf or cdf).
The file could be quite large, millions of integers. It shouldn’t matter I guess.
If it’s a text file (not a binary file), you can probably just use the LOAD command:
I assume your data file could have one value per row or one long row with values separated by spaces, so the
(:).'operation (a colon reshape plus a transpose) ensures that no matter which one it is you will get a 1-by-N result fordata.