reading files that contain changing parts and parts that need to be ignored
1 view (last 30 days)
Show older comments
Luis Eduardo Cofré Lizama on 16 Sep 2022
Commented: Luis Eduardo Cofré Lizama on 18 Sep 2022
Hi there I am trying to read in a loop a series of files that have certain parts that need to be ignored and others vary. For example I want to read the file 'h001s1_EC1_Sway.h5' for which I did the following considering the varying parts of the file:
but didnt work.
Any ideas how can I do it so I ignore the '*' parts when reading the file?
Rik on 16 Sep 2022
You need to use dir to find the actual file name matching some pattern. Then you can provide the function with the real file name. Unless explicitly stated otherwise, Matlab functions do not allow you to provide a file pattern instead of a real name.
More Answers (0)
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!