-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_plots.m
34 lines (30 loc) · 1018 Bytes
/
do_plots.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
function [dict] = do_plots(mypath)
% plot PrshowX
% mypath: directory name that stores the .mat files
% files in mypath example: tomo_single_64_default_0.01_info.mat
d = uigetdir(mypath);
fileList = dir(fullfile(d, '*.mat'));
count = 1;
for i=1:length(fileList)
name = string(fileList(i).name);
if contains(name,'x')
xpath = string(fileList(i).folder)+'/'+name;
a = load(xpath);
infoname = fieldnames(a);
X = a.(infoname{1});
prob_path = string(fileList(i).folder)+'/'+strrep(name,'x','prob');
a = load(prob_path);
infoname = fieldnames(a);
ProbInfo = a.(infoname{1});
setting = split(name,'_');
label = string(strjoin(setting(1:5)));
figure(count), clf, axes('FontSize', 18), hold on;
idx = size(X,2);
while sum(isnan(X(:,idx))) ~= 0 %|| sum(isinf(X(:,idx))) ~= 0
idx=idx-1;
end
PRshowx(X(:,idx), ProbInfo), hold on
title(label);
count=count+1;
end
end