Want to load mat files one by one from specified folder.. and want to perform further operations on it..
Mat file contains a single image array data..
Following code gives error.. but that mat file is present to specified location
Code:
myFolder = 'H:\Try\module\ref'; filePattern = fullfile(myFolder, '*.mat'); matFiles = dir(filePattern); for i = 1:length(matFiles) baseFileName = matFiles(i).name; load(baseFileName); end
Output:
Error using loadUnable to read file 'abc.mat'. No such file or directory.
Best Answer