mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/regression] Compute numberOfPoints automatically
Change-Id: I35a1902aeda06cc80ae8808d886b3e161bae8ad9
This commit is contained in:
committed by
EmilieNumworks
parent
72e8ac7d02
commit
e9662e4c45
@@ -196,7 +196,8 @@ QUIZ_CASE(trigonometric_regression) {
|
||||
double x[] = {1, 31, 61, 91, 121, 151, 181, 211, 241, 271, 301, 331, 361};
|
||||
double y[] = {9.24, 10.05, 11.33, 12.72, 14.16, 14.98, 15.14, 14.41, 13.24, 11.88, 10.54, 9.48, 9.19};
|
||||
double coefficients[] = {2.9723, 0.016780, -1.3067, 12.146};
|
||||
int numberOfPoints = 13;
|
||||
int numberOfPoints = sizeof(x) / sizeof(double);
|
||||
assert(sizeof(y) == sizeof(double) * numberOfPoints);
|
||||
|
||||
// TODO : Ensure unicity with trigonometric coefficients.
|
||||
Poincare::Preferences::sharedPreferences()->setAngleUnit(Poincare::Preferences::AngleUnit::Radian);
|
||||
|
||||
Reference in New Issue
Block a user