mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ScatterCtrl_Demo: Replaced VectorDouble with VectorXY
git-svn-id: svn://ultimatepp.org/upp/trunk@15148 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ebacdb9e9b
commit
38fd05b4d6
1 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ void Tab11_Trend::OnSeries() {
|
|||
s1x << -3.067E0 << -2.981E0 << -2.921E0 << -2.912E0 << -2.840E0 << -2.797E0 << -2.702E0 << -2.699E0 << -2.633E0 << -2.481E0 << -2.363E0 << -2.322E0 << -1.501E0 << -1.460E0 << -1.274E0 << -1.212E0 << -1.100E0 << -1.046E0 << -0.915E0 << -0.714E0 << -0.566E0 << -0.545E0 << -0.400E0 << -0.309E0 << -0.109E0 << -0.103E0 << 0.010E0 << 0.119E0 << 0.377E0 << 0.790E0 << 0.963E0 << 1.006E0 << 1.115E0 << 1.572E0 << 1.841E0 << 2.047E0 << 2.200E0;
|
||||
s1y << 80.574E0 << 84.248E0 << 87.264E0 << 87.195E0 << 89.076E0 << 89.608E0 << 89.868E0 << 90.101E0 << 92.405E0 << 95.854E0 << 100.696E0 << 101.060E0 << 401.672E0 << 390.724E0 << 567.534E0 << 635.316E0 << 733.054E0 << 759.087E0 << 894.206E0 << 990.785E0 << 1090.109E0 << 1080.914E0 << 1122.643E0 << 1178.351E0 << 1260.531E0 << 1273.514E0 << 1288.339E0 << 1327.543E0 << 1353.863E0 << 1414.509E0 << 1425.208E0 << 1421.384E0 << 1442.962E0 << 1464.350E0 << 1468.705E0 << 1447.894E0 << 1457.628E0;
|
||||
|
||||
VectorDouble vs1(s1y, s1x);
|
||||
VectorXY vs1(s1x, s1y);
|
||||
|
||||
linear.Fit(vs1, l_r2);
|
||||
poly2.SetDegree(2);
|
||||
|
|
@ -46,13 +46,13 @@ void Tab11_Trend::OnSeries() {
|
|||
sin.Fit(vs1, s_r2);
|
||||
|
||||
scatter.AddSeries(s1x, s1y).Legend("Series 1").MarkStyle<RhombMarkPlot>().MarkWidth(10).NoPlot();
|
||||
} else /*if (seriesList == "Series 2")*/ {
|
||||
} else {
|
||||
s2x.Clear();
|
||||
s2y.Clear();
|
||||
s2y << -0.9 << -1.1 << 2.8 << -3.4 << 2.7 << -0.9 << -1.1 << 2.8 << -3.4 << 2.7 << -0.9 << -1.1 << 2.8 << -3.4 << 2.7 << -0.7 << -1.2;
|
||||
s2x << 0 << 0.6 << 1.2 << 1.8 << 2.5 << 3.1 << 3.7 << 4.3 << 5.0 << 5.6 << 6.2 << 6.9 << 7.5 << 8.1 << 8.7 << 9.4 << 10.0;
|
||||
|
||||
VectorDouble v2(s2y, s2x);
|
||||
VectorXY v2(s2x, s2y);
|
||||
|
||||
linear.Fit(v2, l_r2);
|
||||
poly2.SetDegree(2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue