How to place the variables in the workstation into a matrix?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I have used the GMModel on my data, and in the workstation I have results from the model, now I would like to use a few of these generated results and place them in a matrix. How do I do that exactly?
I've been using matlab for a week now, so I'm not very familiar with it yet.
댓글 수: 2
답변 (1개)
Ameer Hamza
2020년 10월 2일
These values are properties of class gmdistribution, you can access them like this
mu_matrix = GMModel.mu;
sigma_matrix = GMModel.Sigma;
..
..
You cannot place them in a single matrix because they all have different sizes. The other alternative is to place them in cell array
M = {GMModel.mu, GMModel.Sigma}
댓글 수: 2
Ameer Hamza
2020년 10월 2일
fitgmdist always returns the gmdistribution object. You will need to manually assign those values to separate variables, as I have shown in the answer.
참고 항목
카테고리
Help Center 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!