Clear Filters
Clear Filters

Ezplot using Functions for PDF plotting

4 views (last 30 days)
Kash022
Kash022 on 20 Mar 2019
Hello,
I am trying to ezplot a GMM model which I have made.
mu = mean(score,2); % score is a 2500x10 double
cov_sigma = cov(score); % 10x10 double
gm= gmdistribution(mu,cov_sigma); % GMM distibution object
yyy = pdf(gm,score); % 2500x1 double which is my PDF matrix
figure; ezplot(@(x) pdf(gm,x)); % I think I should be using yyy here but this is where I start to get lost; either way doing that also doens't work %
gmm_error.JPG
So I understand that "x" needs to be a row vector; but how do I define its range? (even yyy doesn't work for me) Sorry, but I have always had this issue with plotting pdf's given functions and ranges. Or is there any other way of plotting it at all? (I have already seen, tried and failed using MathWorks-this, this and MathWorks-also this)
Any assistance will be highly appreciated! Thanks!
~Kash022

Answers (0)

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!