Uploading multiple matfiles from same folder.

1 次查看(过去 30 天)
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