Hi, guys I use Table to calculate my problem on a discrete interval as follows:
Clear["`*"];(*????????,??Table*)
b = 2;
y01 = N[Maximize[{-x*a - 6*x*b + 1, -6 <= x <= -(4/8)}, x]];
y11 = N[Maximize[{-x^3*a + 2*x*b - 1, -2 <= x <= 2}, x]];
Y01 = Table[y01, {a, 2, 5, 1}]
Y11 = Table[y11, {a, 2, 5, 1}]
Y = MaximalBy[{Y01, Y11}, First]
Y[[All, All, 1]]
ListPlot[Y[[All, All, 1]], DataRange -> {2, 5}]
Y[[1, All, 2, All, 2]]
ListPlot[Y[[1, All, 2, All, 2]], DataRange -> {2, 5}]
It ( DataRange -> {2, 5}) works with ListPlot[Y[[All, All, 1]], not with ListPlot[Y[[1, All, 2, All, 2]]. More importantly, if I changes space from 1 to 2, that is
Clear["`*"];(*????????,??Table*)
b = 2;
y01 = N[Maximize[{-x*a - 6*x*b + 1, -6 <= x <= -(4/8)}, x]];
y11 = N[Maximize[{-x^3*a + 2*x*b - 1, -2 <= x <= 2}, x]];
Y01 = Table[y01, {a, 2, 5, 2}]
Y11 = Table[y11, {a, 2, 5, 2}]
Y = MaximalBy[{Y01, Y11}, First]
Y[[All, All, 1]]
ListPlot[Y[[All, All, 1]], DataRange -> {2, 5}]
Y[[1, All, 2, All, 2]]
ListPlot[Y[[1, All, 2, All, 2]], DataRange -> {2, 5}]
It does not work for both ListPlot[Y[[All, All, 1]] and ListPlot[Y[[1, All, 2, All, 2]]. Therefore, my problem is how to change the horizontal ordinate if the space changes when I use Table? Thank you very much!