Synchronize common scilab examples with other languages

This commit is contained in:
William S Fulton 2014-09-03 07:18:10 +01:00
commit ea634d54a5
4 changed files with 7 additions and 8 deletions

View file

@ -9,7 +9,7 @@ double average(std::vector<int> v) {
return std::accumulate(v.begin(),v.end(),0.0)/v.size();
}
std::vector<double> half(const std::vector<double> v) {
std::vector<double> half(const std::vector<double>& v) {
std::vector<double> w(v);
for (unsigned int i=0; i<w.size(); i++)
w[i] /= 2.0;