File: phaseplot_ref_mat.m

package info (click to toggle)
python-ltfatpy 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 41,408 kB
  • sloc: ansic: 8,546; python: 6,470; makefile: 15
file content (60 lines) | stat: -rw-r--r-- 1,558 bytes parent folder | download | duplicates (2)
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 phaseplot_ref_mat(filepath)
% Save the output of the phaseplot function into a .mat file for some example
% inputs

if nargin < 1
    filepath = pwd();
end

filename=[filepath, '/phaseplot_ref.mat'];
disp(filename)

data = {};

f = (1:3).';
inputs_names = {'f', 'display'};
inputs = {f, '_bool_False_'};
nb_outputs = 1;
outputs = cell(1, nb_outputs);
[outputs{:}] = phaseplot(f, 'nodisplay');
data{end+1} = {inputs_names, inputs, outputs};

thr = 0.3;
inputs_names = {'f', 'display', 'thr'};
inputs = {f, '_bool_False_', thr};
[outputs{:}] = phaseplot(f, 'nodisplay', 'thr', thr);
delete(gcf);
data{end+1} = {inputs_names, inputs, outputs};

f = [1+3*i, 2+2*i, 3+1*i];
wlen = 2;
inputs_names = {'f', 'display', 'wlen'};
inputs = {f, '_bool_False_', wlen};
[outputs{:}] = phaseplot(f, 'nodisplay', 'wlen', wlen);
delete(gcf);
data{end+1} = {inputs_names, inputs, outputs};

f = (1:3).';
inputs_names = {'f', 'display', 'nf'};
inputs = {f, '_bool_False_', '_bool_True_'};
[outputs{:}] = phaseplot(f, 'nodisplay', 'nf');
data{end+1} = {inputs_names, inputs, outputs};

f = (1:8).';
fmax = length(f) * 0.2;
inputs_names = {'f', 'display', 'fmax'};
inputs = {f, '_bool_False_', fmax};
[outputs{:}] = phaseplot(f, 'nodisplay', 'fmax', fmax);
data{end+1} = {inputs_names, inputs, outputs};

f = (1:8).';
fs = 1.;
fmax = 0.2;
inputs_names = {'f', 'display', 'fs', 'fmax'};
inputs = {f, '_bool_False_', fs, fmax};
[outputs{:}] = phaseplot(f, fs, 'nodisplay', 'fmax', fmax);
data{end+1} = {inputs_names, inputs, outputs};

save(filename, 'data', '-V6');

end