My task is something like this:
PrependTo[Evaluate[Table[{x, Sin[x]}, {x, 0.1, 2 \[Pi], 0.1}], {0., 1.}]]
where I tried also skipping the
Evaluate
and I get a
PrependTo::rvalue:
error.
If I do:
a = Table[{x, Sin[x]}, {x, 0.1, 2 \[Pi], 0.1}];
b = PrependTo[b, {0., 0.}];
everything works fine. I want it to be a part of a big code, so doing it in one line without defining the first list separately would speed up the program. And I don't need the first list, only the second one, so why should I store both?
How can I deal with this problem?
Edit: The case is to make
Join[{{0., 0.}}, Table[{x, Sin[x]}, {x, 0.1, 2 \[Pi], 0.1}], 1]
but are there other, maybe better, solutions?