MATLAB Answers

How to calculate mean of output in a for loop?

2 views (last 30 days)
Ellie Brown
Ellie Brown on 3 Dec 2019
Commented: Rik on 4 Dec 2019
I

  1 Comment

Rik
Rik on 4 Dec 2019
Does this editing away mean you have found a solution on your own?

Sign in to comment.

Answers (1)

Rik
Rik on 3 Dec 2019
If you want to calculate the mean and the variance you will have to store the output. Since you know the number of iterations, you can preallocate an appropriate vector.

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags