-
Notifications
You must be signed in to change notification settings - Fork 0
/
plotlandscape.m
72 lines (71 loc) · 2.64 KB
/
plotlandscape.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
61
62
63
64
65
66
67
68
69
70
71
72
function pars_best = plotlandscape(y,in)
nbins = in.nbins;
switch in.model
case 'eSANDIX'
in.comps = [1 4 5]; % eSANDIX
if ~isfield(in,'D0_sphere')
in.D0_sphere = 2.0;
end
S_fun = @(x) fun_comps_ave(x,y,in);
labels = ["$D_{stick}$","$R$","$f_n$", "$D_n$", "$D_e$", "$r_n$"];
if all(isfield(in,{'ub','lb'}))
bins = arrayfun(@(a,b)(linspace(a,b,nbins)),in.lb,in.ub,'UniformOutput',false);
else
bins = {linspace(0.1,0.9,nbins)
linspace(5,15,nbins)
linspace(0.1,0.9,nbins)
linspace(0,3,nbins)
linspace(0,3,nbins)
linspace(0.05,0.5,nbins)};
end
pars_best = landscape(y, S_fun, bins, [], labels);
case 'SANDIX'
in.comps = [4 5]; % SANDIX
if ~isfield(in,'D0_sphere')
in.D0_sphere = 2.0;
end
S_fun = @(x) fun_comps_ave(x,y,in);
labels = ["$Dstick$","$R$","$f_n$", "$D_n$", "$D_e$", "$r_n$"];
if all(isfield(in,{'ub','lb'}))
bins = arrayfun(@(a,b)(linspace(a,b,nbins)),in.lb,in.ub,'UniformOutput',false);
else
bins = {
linspace(0,3,nbins)
linspace(5,15,nbins)
linspace(0.1,0.9,nbins)
linspace(0,3,nbins)
linspace(0,3,nbins)
linspace(0.05,0.5,nbins)};
end
pars_best = landscape(y, S_fun, bins, [], labels);
case 'SMEX'
in.comps = 5; % SMEX
S_fun = @(x) fun_comps_ave(x,y,in);
labels = ["$f_n$", "$D_n$", "$D_e$", "$r_n$"];
if all(isfield(in,{'ub','lb'}))
bins = arrayfun(@(a,b)(linspace(a,b,nbins)),in.lb,in.ub,'UniformOutput',false);
else
bins = {
linspace(0.1,0.9,nbins)
linspace(0,3,nbins)
linspace(0,3,nbins)
linspace(0.02,0.5,nbins)};
end
pars_best = landscape(y, S_fun, bins, [], labels);
case 'SMEXdot'
in.comps = [0 5]; %
S_fun = @(x) fun_comps_ave(x,y,in);
labels = ["$f_n$", "$D_n$", "$D_e$", "$r_n$"];
if all(isfield(in,{'ub','lb'}))
bins = arrayfun(@(a,b)(linspace(a,b,nbins)),in.lb,in.ub,'UniformOutput',false);
else
bins = {
linspace(0.1,0.9,nbins)
linspace(0,3,nbins)
linspace(0,3,nbins)
linspace(0.05,0.5,nbins)};
end
pars_best = landscape(y, S_fun, bins, [], labels);
otherwise
error("Invalid model specified")
end