having problem with mvnrnd...

조회 수: 9 (최근 30일)
Nadhirah Jofri
Nadhirah Jofri 2015년 8월 5일
답변: Roya Kakar 2022년 1월 19일
i'm having problem with the mvnrnd.. its when i run the coding, it says "Undefined function'mvnrnd' for input arguments of type 'double'".. the coding is below..i don't know if i'm overlook at certain part..help me please.. i'm new to Matlab.
X1=mvnrnd(mu1,sigma,n1);

채택된 답변

Al Dente
Al Dente 2015년 8월 5일
matlab is basically telling you that it can't find the function:
which mvnrnd
will probably result in: 'mvnrnd' not found
mvnrnd is part of the statistics toolbox, type 'ver' in matlab and see if you have it.
ver
% Stateflow Coder Version 7.6.1 (R2010bSP1)
% Statistics Toolbox <-- Version 7.4 (R2010bSP1)
% Symbolic Math Toolbox Version 5.5 (R2010bSP1)
  댓글 수: 1
Nadhirah Jofri
Nadhirah Jofri 2015년 8월 5일
erm..ok, it seems like i don't have that Statistic toolbox.. thanks for the info...

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Roya Kakar
Roya Kakar 2022년 1월 19일
I don't have Statistics Toolbox in my Matlab, how can I get it?

Roya Kakar
Roya Kakar 2022년 1월 19일
function p = mygmm(x1,x2, w1, mu1, sigma1, w2, mu2, sigma2)
assert(w1 +w2 == 1.0, 'The weights of the components must add to 1.0')
assert(all([w1 w2] >= 0 & [w1 w2] <=1)),
p = w1 * mvnpdf([x1 x2], mu1, sigma1) + w2 * mvnpdf([x1 x2] , mu2, sigma2);
end
By running the above code I get the following error message:
Not enough input arguments.

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by