importdata: file name string operations
이전 댓글 표시
Hi,
My program simulates some physical stuff and I store my results in different files, which I index according to my liking. To gather more data I add another index to the file name, so that I can run the program on different computers and then collect all the data files without having to overwrite those that have the same (first) index. The whole thing eventually looks like this: ['file_name_primary_index' 'secondary_index']
This is the easy part. Now I have to access the files with the same primary index. I know the 1st part of the file name (which is 'file_name_primary_index'). The 2nd part doesn't interest me, because it could be anything, technically, so this one is unknown. But the importdata function requires the FULL name of the file.
The best way to do this is to shove the result of "dir file_name_primary_index" in a vector, so that I could get all names containing that string. Theoretically of course. Now I don't know how to do that. (A=dir is an option, but then, how do I pull off the unnecessary files?)
Thnx!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!