Multivariate Normal Distribution : Error using mvnpdf (line 67)

2 ビュー (過去 30 日間)
Gowri Prasood
Gowri Prasood 2023 年 4 月 4 日
回答済み: Walter Roberson 2023 年 4 月 4 日
Hello everyone,
for the analysis of a measurement I'm trying to use the multivariate normal distribution function mvnpdf.
loglik1 = sum(log(w*mvnpdf(all_energy1, mu1, Sigma)));
Error using mvnpdf (line 67)
X and MU must have the same number of columns.
all_energy2 is 1x19640 double and mu2 is 5x1 double. sigma = 1x5 cell . w= 5x1 double .
I'm using Matlab R2020b.

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 4 月 4 日
mvnpdf does not accept cell for any parameters.
mvnpdf does not accept a series of different mu with the intention of evaluating X at each of the mu. The provided mu must have the same number of columns as X and must either have one row or else be the same size as X

カテゴリ

Help Center および File ExchangeProbability Distributions and Hypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by