How to code this equation?
Show older comments
To improve the significance of the data, a comprehensive evaluation parameter was set in the experiment so that the average values of different sets of test data could be presented in a consistent manner:
.png)
where n is the sample size, Yi is the result of testing on a certain sample, and Y_ is the average value.
How to code this equation?
Accepted Answer
More Answers (1)
Walter Roberson
on 5 Dec 2019
y_bar = mean(Y);
or
y_bar = sum(Y)./length(Y);
Note: the second of those will malfunction if Y is a 2D array that has more columns than it has rows. The equation does not describe what should happen for 2D arrays, so what the "correct" output is for that case can be argued.
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

