for loop in for loop not storing all variables
12 views (last 30 days)
Dameon Solestro on 22 Nov 2021
In the simplest way, I am trying to get 3 random (x,y) data sets per group with a total of 5 groups. (So 15 x coordinates and 15 y coordinates in total). Every time I use my mean(x) to find the average x. My for loop only calculates the mean for my groups of x coordinates. How do i do it for all 15 x coordinates?
Walter Roberson on 23 Nov 2021
You can see that if you stored all of the values, that mean(x,1) calculates the same thing as taking the mean of each column at the time you generate the column.