File: largestr_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 (31 lines) | stat: -rw-r--r-- 674 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
function largestr_ref_mat(filepath)
% Save the output of the largestr function into a .mat file for some example
% inputs

if nargin < 1
    filepath = pwd();
end

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

inputs_names = {'xi', 'p', 'thresh_type'};
xi = [0., 0.1, 0.4; 0.5, 0.8, 1.];
p = 0.5;
thresh_types = {'hard', 'wiener', 'soft'};

nb_outputs = 2;
outputs = cell(1, nb_outputs);

data = {};

for ind_thresh_type = 1:length(thresh_types)
    thresh_type = thresh_types{ind_thresh_type};
    inputs = {xi, p, thresh_type};
    [outputs{:}] = largestr(inputs{:});
    data{end+1} = {inputs_names, inputs, outputs};
end

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

end