-
Notifications
You must be signed in to change notification settings - Fork 1
/
main0.m
34 lines (30 loc) · 1.11 KB
/
main0.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%*****************************************************************************
%This script display version information of your Matlab and unzip test data.
%*****************************************************************************
mainPath = fileparts(mfilename('fullpath')); % Get fullpath of this script
cd(mainPath)
addpath('.\FunctionFiles')
% Display version information
disp('>>>'); disp('>>>')
disp('This program needs:')
disp(' - Matlab (R2017b or newer version),')
disp(' - Image Processing Toolbox,')
disp(' - Statistics and Machine Learning Toolbox,')
disp(' - Neural Network Toolbox.')
disp('Please check version information of your Matlab.')
disp('>>>'); disp('>>>')
ver
disp('>>>'); disp('>>>')
% Unzip test image data
folderInfo = dir('.\TestData');
fileNames = cat(1,{folderInfo.name})';
isTiffFile = FindStringPattern(fileNames,'.tif');
TiffFileNames = fileNames(isTiffFile > 0);
if size(TiffFileNames,1)~=16
disp('Unzipping image files...')
for i = 1:16
zipFileName = sprintf('416_0%02d.zip',i);
unzip(['.\TestData\' zipFileName],'.\TestData')
end
end
disp('main0.m completed!')