-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMAUTOLAB.m
More file actions
53 lines (47 loc) · 1.47 KB
/
Copy pathMAUTOLAB.m
File metadata and controls
53 lines (47 loc) · 1.47 KB
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
function output = MAUTOLAB(filename)
% MAUTOLAB Unified reader for AUTO-07p output files.
%
% data = MAUTOLAB('lor')
%
% Reads b.lor, d.lor, s.lor from the current working directory.
% Reader functions are loaded from the MAUTOLAB subfolders.
rootDir = fileparts(mfilename('fullpath'));
addpath(fullfile(rootDir, 'b_files'));
addpath(fullfile(rootDir, 'd_files'));
addpath(fullfile(rootDir, 's_files'));
output = struct();
output.filename = filename;
bfile = ['b.' filename];
dfile = ['d.' filename];
sfile = ['s.' filename];
if isfile(bfile)
try
output.bif_diagram = read_b_auto(bfile);
catch ME
warning('MAUTOLAB:read_b_failed', ...
'Failed to read %s: %s', bfile, ME.message);
end
else
warning('MAUTOLAB:missing_b', 'File %s not found.', bfile);
end
if isfile(dfile)
try
output.diagnostics = read_d_auto(dfile);
catch ME
warning('MAUTOLAB:read_d_failed', ...
'Failed to read %s: %s', dfile, ME.message);
end
else
warning('MAUTOLAB:missing_d', 'File %s not found.', dfile);
end
if isfile(sfile)
try
output.solutions = read_s_auto(sfile);
catch ME
warning('MAUTOLAB:read_s_failed', ...
'Failed to read %s: %s', sfile, ME.message);
end
else
warning('MAUTOLAB:missing_s', 'File %s not found.', sfile);
end
end