MATLAB: I have file HMINT_3333.mat is located in any one director i need to load this file by directly getting filename can any body help

listload

file path c:\data\HMINT_3333.mat
this data folder may have other mat file also i need to open this mat file and tried to plot it but i could not open it since i know that i can load this file by following command but if i do not know the name of file in specific folder and then i need to open such files how it is possible.
load ('c:\data\HMINT_3333.mat')
i use following solution
list=dir(pwd); %get info of files/folders in current directory
isfile=~[list.isdir]; %determine index of files vs folders
filenames={list(isfile).name}; %create cell array of file names
it gives me the variable name filenames have n number of cell
if i use filenames(3) then i found following ans
'HMINT_6535.mat'
but when i use load(filenames(i).name) it does not work
please help

Best Answer

load(filenames{i})