필터 지우기
필터 지우기

How to open files with different names in a loop?

조회 수: 4 (최근 30일)
MC3105
MC3105 2014년 10월 20일
댓글: Neamah Alskeini 2017년 12월 21일
Hello everyone!
I have looked up a solution for my problem on the internet, but since I am still so new to matlab I have problems to find a solution that really works for my problem... your help would therefore be greatly appreciated!
I want to create a loop that loads different files with similar names in each loop iteration. The names of my data are for example: data_ID_200.m and data_ID_304.m. After loading I want to use the data in a program I have already written. How can I write a code for this loop??
Do I have to put all the files that are supposed to be uploaded in a separate directory? Or do they go into the same directory where my main code is saved?
Thans a lot!!

채택된 답변

Stalin Samuel
Stalin Samuel 2014년 10월 20일
  댓글 수: 1
MC3105
MC3105 2014년 10월 20일
thank you! do you know whether there is a possibility - after loading the datasets and running my program for each dataset - to save the created data to files that have the same IDs as the original files (ID_200 and ID_304)? the names list that I created with your help now contains the names data_ID_200.m and data_ID_304.m ...

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by