I have been working on a triple-nested list, called datasections, of the given form:
{{{44.5, 0.00185}, {45.2, 0.00186}, {45.5, 0.00186},...},
{{48.6, 0.00186}, {49.2, 0.00209}, {49.9, 0.00109},...},
...
}
I want to multiply all the secondary values within the lowest level of the list by a constant value, while retaining the primary values.
For example, if the constant value was 2, then the outcome would be:
{{{44.5, 0.0037}, {45.2, 0.00372}, {45.5, 0.00372},...},
{{48.6, 0.00372}, {49.2, 0.00418}, {49.9, 0.00218},...},
...
}
Currently, I have written a code which accomplishes the wanted task, but this code loses the triple nested list structure, which I need to retain.
{Join[
Partition[
Flatten[datasections[[]], 1][[All, 1]], 1],
Partition[
Flatten[datasections[[]], 1][[All, 2]]*2, 1], 2
]}
Is there a simple way to accomplish the task at hand?