Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
SysBiOThe
/
CRA-Matlab
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit a85260d1
authored
2019-03-31 21:21:16 +0200
by
Chiara Antonini
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Upload new file
1 parent
6b73a63e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
CRA_Updated_Version/Classes/sorted.m
CRA_Updated_Version/Classes/sorted.m
0 → 100644
View file @
a85260d
%Class that extends the abstract class TailMethod. The method compute_tail
%computes the upper and lower tail of a pdf by sorting its values and
%selecting the first and the last N samples. It takes in input
%an object TimeBehavior containing the values of the evaluation function,
%the array perturbation of perturbed parameters and tail_size which specifies
%the number of samples in each tail. It returns in output the following variables:
% - XiMin is the array containing parameter samples in the lower tail
% - XiMax is the array containing parameter samples in the upper tail
classdef
sorted
<
TailMethod
properties
end
methods
function
[
XiMax
,
XiMin
]
=
compute_tailspdf
(
obj
,
obj_TimeBehavior
,
perturbation
,
tail_size
)
samples
=
obj_TimeBehavior
.
evalFuncValues
;
[
samples_sorted
,
indexes_sorted
]
=
sort
(
samples
);
XiMin
=
[];
XiMax
=
[];
for
j
=
1
:
tail_size
XiMax
=
[
XiMax
;
perturbation
(
indexes_sorted
(
length
(
samples
)
+
1
-
j
,
1
),:)];
XiMin
=
[
XiMin
;
perturbation
(
indexes_sorted
(
j
,
1
),:)];
end
end
end
end
\ No newline at end of file
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment