Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Multi-agent interaction planning
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Larkin Heintzman
Multi-agent interaction planning
Commits
d6b76b70
Commit
d6b76b70
authored
Dec 10, 2019
by
Larkin Heintzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
3980a68e
Pipeline
#20
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
buildGMM.m
Matlab Code/buildGMM.m
+23
-0
No files found.
Matlab Code/buildGMM.m
0 → 100644
View file @
d6b76b70
function
[
gmPDF
,
Z
,
gm
,
x_area
,
y_area
]
=
buildGMM
(
plotArea
,
mu
,
sigma
)
% BUILDGMM builds a gmm based on means and comvariances and gives the pdf
% back along with a matrix of points evaluated over the sim plot range
% mu = 10*rand(k,sim.d); % means
% sigma = 5 + ones(1,2,k); % covariances
gm
=
gmdistribution
(
mu
,
sigma
);
gmPDF
=
@
(
x
,
y
)
pdf
(
gm
,[
x
y
]);
x_area
=
plotArea
(
1
):
0.1
:
plotArea
(
2
);
% use plot range
y_area
=
plotArea
(
3
):
0.1
:
plotArea
(
4
);
Z
=
zeros
(
numel
(
y_area
),
numel
(
x_area
));
for
i
=
1
:
numel
(
x_area
)
for
j
=
1
:
numel
(
y_area
)
Z
(
j
,
i
)
=
gmPDF
(
x_area
(
i
),
y_area
(
j
));
end
end
% want to build in clever sampling based on the gm distribution so we dont
% have to sample as much
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment