wish_C
asked on
How to plot Isocontour of a covariance matrix of a gaussian distribution?
Hi Experts,
I just want to ask how you can plot the Isocontour of covariance of a Gaussian, say covariance of the code in
The covariance i am talking about is in the following code:
Here. The line of code in question are
i am trying to use the example:Click
but
I just want to ask how you can plot the Isocontour of covariance of a Gaussian, say covariance of the code in
The covariance i am talking about is in the following code:
Here. The line of code in question are
mu = mean(top_x); % mean vector calculation
Sigma = cov(top_x); % Covariance calculation
i am trying to use the example:Click
but
g = gaussdens('m',[1;2],'var',[4 1;1 2]);
does not exist in my matlab version(Ver R2008b). The
show(g)
also does not work. Any idea of any function that does this job in matlab?g = gaussdens('m',[1;2],'var',[4 1;1 2]);
show(g)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks yuk99, i did not try your suggestion, but i believe it may work since it is also a third party function. I actually downloaded the matlab functionm when i posted this question, but found a third party which works for me, so i did not bother to continue. Just one more question. Am trying to plot the selection in This code and the code for selecting the top individuals in the population is this:
but anytime i look at the plot of the initial population and the selected population, they look different. The position of the selected ones are different from their position in the initial population. Why is this happening. The concern code is in ID: 39196865.
top_x = pop(b(1:options.topSize),:)
but anytime i look at the plot of the initial population and the selected population, they look different. The position of the selected ones are different from their position in the initial population. Why is this happening. The concern code is in ID: 39196865.
I think you are asking completely different question than was in the original question. If you have solved the original problem (running through the tutorial of Statlearn or doing the same by other tools) you should close the question and open a new one.
In the new question please show some figures to illustrate your problem? If possible show a code that simplify the problem and can be reproduced (all variables and functions are defined). It will help me to answer quicker. Actually, believe it or not, in many cases when people do this, they can find the solution by themselves.
In the new question please show some figures to illustrate your problem? If possible show a code that simplify the problem and can be reproduced (all variables and functions are defined). It will help me to answer quicker. Actually, believe it or not, in many cases when people do this, they can find the solution by themselves.
ASKER
I figured it out myself.
Download and properly install the toolbox (you will need to add the toolbox path to MATLAB with setpath), then you can follow the tutorial.
You can also do similar staff with MATLAB's Statistical toolbox. See http://www.mathworks.com/help/stats/multivariate-normal-distribution.html for details.