Commit d6b76b70 authored by Larkin Heintzman's avatar Larkin Heintzman

Upload New File

parent 3980a68e
Pipeline #20 canceled with stages
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment