Hello,
i use the textscan function to read the first 500 lines (the header of my measurement data is really big) of a lot of text files, to check which file i can evaluate. I used the Matlab Version R2019a. To read the first 500 lines of the files the function needed some µs (local drive) and 0.5 seconds (network drive).
Recently i changed to R2021b and the same function now needs on my local drive nearly 0.5 seconds and on the network drive 12 seconds.
After some tests with both matlab versions, it looks like that the new Matlab version reads the whole file and than saved the first 500 lines while the old version reads only the 500 lines.
data = textscan(fid, '%s', 500)