octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #50286] [octave forge] (statistics) fitgmdist:


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #50286] [octave forge] (statistics) fitgmdist: No input check and demo doesn't work
Date: Sat, 6 Aug 2022 11:59:42 -0400 (EDT)

Follow-up Comment #3, bug #50286 (project octave):

for easier copy paste here's the current failing demo code that should run
after loading the statistics pkg :


## Generate a two-cluster problem
C1 = randn (100, 2) + 1;
C2 = randn (100, 2) - 1;
data = [C1; C2];

## Perform clustering
GMModel = fitgmdist (data, 2);

## Plot the result
figure
[heights, bins] = hist3([C1; C2]);
[xx, yy] = meshgrid(bins{1}, bins{2});
bbins = [xx(:), yy(:)];
contour (reshape (GMModel.pdf (bbins), heights));
hold on
plot (centers (:, 1), centers (:, 2), "kv", "markersize", 10);
hold off



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?50286>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]