MATLAB Answers

I get 'error using sum' whenever I try to get the mean of some numbers.

13 views (last 30 days)
Rothsothearith Sam
Rothsothearith Sam on 12 Apr 2021 at 9:37
Commented: Rik on 12 Apr 2021 at 11:20
Anyone have any idea why?
This is from my command window:
Any help would be appreciated.
  1 Comment
Rik
Rik on 12 Apr 2021 at 11:20
You're entering the 3 values as parameters, not as an array. You may read the documentation to see some examples.

Sign in to comment.

Answers (1)

Alan Stevens
Alan Stevens on 12 Apr 2021 at 10:28
mean([1.0411, 1.0184, ...etc])
Enclose the numbers within square brackets.

Community Treasure Hunt

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

Start Hunting!