how to write the mean equation

4 次查看(过去 30 天)
Emily Gallagher
Emily Gallagher 2019-9-17
编辑: Stephan 2019-9-17
How do I manually enter the mean equation?
  1 个评论
Adam
Adam 2019-9-17
mean of what? There's a mean function that does it for you. Otherwise you can use
doc sum
if you really want to do it without the mean function.
Or you can add all your numbers together in a for loop if you don't want to use sum either.

请先登录,再进行评论。

回答(1 个)

Stephan
Stephan 2019-9-17
编辑:Stephan 2019-9-17
A_mean = sum(A,'all')/numel(A)

类别

Help CenterFile Exchange 中查找有关 Language Fundamentals 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by