File: pderiv_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 (30 lines) | stat: -rw-r--r-- 613 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
function pderiv_ref_mat(filepath)
% Save the output of the pderiv function into a .mat file for some example
% inputs

if nargin < 1
    filepath = pwd();
end

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

difforders = [2, 4, inf];

inputs_names = {'f', 'difforder'};
nb_outputs = 1;

f = [0:5].';
data = {};
dim = 1;
for ind_difforder = 1:length(difforders)
    difforder =difforders(ind_difforder);
    outputs = cell(1, nb_outputs);
    [outputs{:}] = pderiv(f, dim, difforder);
    inputs = {f, difforder};
    data{end+1} = {inputs_names, inputs, outputs};
end

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

end