I have created a loop that filters text files then plots them. I have a folder Raw_Data within the main folder, i am wanting this code to run without having to change the directory. This program works perfectly if the raw data subfolder is open but fails to load when not. Is their a way to create a relative path from the main folder so that the code can access the data sets in the raw data. The final line returns the error.
Thankyou.
List = uigetfile('*txt','MultiSelect','on')
mkdir('Filtered_Data')
for i=1:length(List);
filename=load(List{i});

댓글 수: 1

Rik
Rik 2020년 4월 2일
Does this mean your previous question is no longer relevant?

댓글을 달려면 로그인하십시오.

답변 (1개)

Rik
Rik 2020년 4월 2일

0 개 추천

As mentioned in the documentation for uigetfile you can capture the path of the selected files as the second output.

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2020년 4월 2일

답변:

Rik
2020년 4월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by