I need to have standard deviation of a vector in Eigen library. I have not found it. So i tried it:
Eigen::VectorXd ys(5);
ys << 1, 2, 3, 4, 5;
double std_dev = sqrt((ys - ys.mean()).square().sum() / (ys.size() - 1)); // Error with minus sign (ys-ys.mean())
But getting error.
error:
Severity Code Description Project File Line Suppression State
Error (active) E0349 no operator "-" matches these operands