Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Variable 'Group_Test1' not found.
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!