read some related posts and found no solution. For a list defined like this
m = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.9, 1.0, 1.5, 1.6};
when I define this function
f[m__] :=m[[Range[2, Length[Evaluate[m]], 1]]] = {{r, x, y, u, v, n, l, w,
s}, m[[Range[2, Length[Evaluate[m]], 1]]]}\[Transpose];
I get an error telling me the list in the part assignment is not a symbol.
I want to be able to build a function that does the operation on different lists and takes the name of the list as an argument.
fsupposed to do? – Kuba May 08 '19 at 08:37m = Transpose[{{r, x, y, u, v, n, l, w, s}, Rest@m}]will accomplish what it appears you're after... – ciao May 08 '19 at 08:49m[[2 ;;]] = Transpose[{{r, x, y, u, v, n, l, w, s}, m[[2 ;;]]}]is what you are trying to do. – LouisB May 08 '19 at 09:21Holdand evaluation control in general - theEvaluateis not needed in this case for example. The error stems from the fact thatmis evaluated to a list before it's passed tof, which causesPartto complain – Lukas Lang May 08 '19 at 11:54