How can you be positive there will always be at least 7 files there?
Also you are not taking into account that the order of files returned is not fixed, and depends on the file system (not the operating system). If you need a particular name then you should use it.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
3 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/244381-index-exceeds-matrix-dimensions-error#comment_311439
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/244381-index-exceeds-matrix-dimensions-error#comment_311439
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/244381-index-exceeds-matrix-dimensions-error#comment_311451
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/244381-index-exceeds-matrix-dimensions-error#comment_311451
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/244381-index-exceeds-matrix-dimensions-error#comment_311453
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/244381-index-exceeds-matrix-dimensions-error#comment_311453
Sign in to comment.