Cannot open file “.” for reading. You might not have read permission.
I am trying to loop through a file and read each image in turn. However, it keeps saying I dont have read permission.
How do I fix this? Thank you!
dataset = dir(‘/Users/Desktop/Image Dataset’);
numFiles = length(dataset);
mydata = cell(1,numFiles);
for k = 1:numFiles
mydata{k} = imread(dataset(k).name);
axes(handles.axes1)
imshow(mydata{k})
endI am trying to loop through a file and read each image in turn. However, it keeps saying I dont have read permission.
How do I fix this? Thank you!
dataset = dir(‘/Users/Desktop/Image Dataset’);
numFiles = length(dataset);
mydata = cell(1,numFiles);
for k = 1:numFiles
mydata{k} = imread(dataset(k).name);
axes(handles.axes1)
imshow(mydata{k})
end I am trying to loop through a file and read each image in turn. However, it keeps saying I dont have read permission.
How do I fix this? Thank you!
dataset = dir(‘/Users/Desktop/Image Dataset’);
numFiles = length(dataset);
mydata = cell(1,numFiles);
for k = 1:numFiles
mydata{k} = imread(dataset(k).name);
axes(handles.axes1)
imshow(mydata{k})
end imread MATLAB Answers — New Questions