MATLAB Answers

0

how to write the mean equation

Asked by Emily Gallagher on 17 Sep 2019
Latest activity Edited by Stephan
on 17 Sep 2019
How do I manually enter the mean equation?

  1 Comment

Adam
on 17 Sep 2019
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.

Sign in to comment.

Tags

1 Answer

Answer by Stephan
on 17 Sep 2019
Edited by Stephan
on 17 Sep 2019

A_mean = sum(A,'all')/numel(A)

  0 Comments

Sign in to comment.