Loading multiple mat files
显示 更早的评论
Hello everyone, i want to load this 3 set of data files into matlab using for loop but it is not working for me. Any help...............
clear all;
close all;
clc;
datafile={'data1.mat' 'data2.mat' 'data3.mat'};
num_schemes=3;
for sno=1:num_schemes
files = char(data(sno));
load files
end
采纳的回答
更多回答(1 个)
ELCIO S
2018-10-30
1 个投票
What about if I have many files with different names? How can I do to load all of them?
1 个评论
"What about if I have many files with different names? How can I do to load all of them?"
Use DIR or SPRINTF:
类别
在 帮助中心 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!