-
Notifications
You must be signed in to change notification settings - Fork 4
/
classiNew.m
61 lines (42 loc) · 1.23 KB
/
classiNew.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
function classiObj=classiNew(varargin)
% define new classification object
% if a numeric value is entered, it will target the repository
path=pwd;
filename='myclassi';
id=1;
if nargin~=0
for i=1:numel(varargin)
if strcmp(varargin{i},'path')
path=varargin{i+1};
end
if strcmp(varargin{i},'filename')
filename=varargin{i+1};
end
if strcmp(varargin{i},'id')
id=varargin{i+1};
end
end
if numel(filename)==0
filename=['myclassi ' char(datetime)];
end
else
[filename,path,rep] = uiputfile('*.mat','File Selection',fullfile(path,[filename '.mat']));
if isequal(filename,0)
disp('User selected Cancel');
classiObj=[];
return;
else
disp(['User selected ', fullfile(path, filename)]);
end
end
if numel(strfind(filename,'.mat'))
filename=replace(filename,'.mat','');
end
classiObj=classi(path,filename,id);
classiObj.log('Classi creation','Creation')
%classiSave(classiObj);
%mkdir(path,filename);
%classiObj.setPath(fullfile(path,filename),filename);
%save(fullfile(path,filename,[filename '_classification.mat']),'classiObj');
%disp(['Classification ' fullfile(path,[filename '_' num2str(id) '.mat']) ' is created and saved !']);
%disp([ 'To add image / phyloCell project to the data, use the addData function']);