Info
This question is closed. Reopen it to edit or answer.
Variable 'Group_Test1' not found.
    2 views (last 30 days)
  
       Show older comments
    
clear all
clc
sad = dir('D:\Project\DB1\test\');  % Returns both folders and files 
cell_array_of_folder_names = {sad([sad.isdir]).name};  % Select folder names 
cell_array_of_folder_names( strncmp( cell_array_of_folder_names, ".", 1 ) ) = []; % Remove '.' and '..' 
folder_names = sort_nat( cell_array_of_folder_names );
%----------------
[mp1, np] = size(folder_names); % compute size = number of subfolders & files & . & ..
csf1=0; % counter of JUST subfolders found in PF
t=1;
for i=1:mp1
%% keep only folders:
P = contains(folder_names{i}, '.');
if ~P
csf1 = csf1 +1; % one sub folder found
SFN = folder_names{i} ;% extract his name
tifList = dir(fullfile( SFN, '*.tif')); % list all jpg files
ms1     = numel(tifList);% ms = number of image files found
%% Processing for each tif file:
for j=1:ms1
tifFileName = tifList(j,:); % extract name of tif file
IM=imread([ SFN '\' tifFileName]);
%t=1;
%for i=1:csf1
 % for j=1:ms1
         Group_Test1(t)={i};
        t=t+1;
end
end
%PF_SFN_imgName = sprintf('%s%s%s',PF,SFN,'\',tifFileName);
end
save('Group_Test','Group_Test1');
%----------------------
Error using save
Variable 'Group_Test1' not found.
Error in Untitled2 (line 37)
save('Group_Test','Group_Test1');
>> 
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!