How to code this equation?
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
galaxy
2019-12-5
This formula mean Y = sum of all Y(i) value with i = 1:n
I do not know what is Y(i) so can not write detai.
Please refer symsum
5 个评论
Walter Roberson
2019-12-5
编辑:Walter Roberson
2019-12-5
M = (dfdx.^2+dfdy.^2)/2 ;
should be
g = sqrt((dfdx.^2+dfdy.^2)/2);
AG = mean(g(:));
As well as the missing sqrt(), you should not be assigning to M as you are using M for an array size.
更多回答(1 个)
Walter Roberson
2019-12-5
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!