Mean of Normal Distribution

8 次查看(过去 30 天)
Hello, we are trying to find the normal distribution of an array using the code below. However we are receiving the error that X must be a numeric column vector. Is there any way to apply the function to all columns? Thanks!

采纳的回答

Adam Danz
Adam Danz 2020-10-28
编辑:Adam Danz 2020-10-28
"Is there any way to apply the function to all columns?"
Yes, use varfun(), assuming the table contains all numeric values.
mu = varfun(@mean, FilledTrtnPos)
or
fitTable = varfun(@(c)fitdist(c,'Normal'), array2table(rand(10,4)))
  4 个评论
Jon Dewland
Jon Dewland 2020-10-28
You are correct, my apologies I misunderstood a normal distribution earlier.
Adam Danz
Adam Danz 2020-10-29
No prob. Glad I could help.

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by