I am trying to read a directory having 24 tiff files. Objective is to call all the 24 files and then one by one use it with the same function. The code is mentioned below.
myPath= 'C:\Users\user\Documents\MATLAB\dir'; %'
files=dir(fullfile(myPath,'*.tiff'));
for k=1:length(files)
A=imread(files(k).name);
end
% while using A=imread(files(k).name),it's reading only one file and also when I am trying to put the function after this particular condition, there's error coming i.e. "Function definitions are not permitted in this context".