Uploading multiple matfiles from same folder.

조회 수: 1 (최근 30일)
Muhammad Haziq
Muhammad Haziq 2019년 5월 22일
댓글: Muhammad Haziq 2019년 5월 23일
Hi,
I want to upload multiple .mat files from a folder and want to save their data in variables. can any body guide me how can I do that. The initial names of the .mat files are different but last name is same.
  댓글 수: 1
Luis J Gilarranz
Luis J Gilarranz 2019년 5월 22일
Is there any pattern in the names? Could you edit the question with 5 file names or so?

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

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 5월 22일
편집: KALYAN ACHARJYA 2019년 5월 22일
Make folder as currnt working directory
list=dir('*.mat');
for j=1:length(list)
matfile=load(list(j).name);
% do operation....one and next loop iterattion it load other
end
or if you want to load all mat files as cell array
use
matfile{j}=load(list(j).name);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by