Given the toy vector:
elettrone={{1.5, 1.5, 0.064, 1.4289, -2.0901, 790.138},{1.5, 1.5, 0.064, 1.4289, -2.0901, 790.138},{1.5, 1.5, 0.064, 1.4289, -2.0901, 790.138}}
I try to change the first three elements as follows:
elettrone[[All, 1]][[1]] -=
dx*Sin[elettrone[[All, 4]][[1]]]*Cos[elettrone[[All, 5]][[1]]];
elettrone[[All, 2]][[1]] -=
dx*Sin[elettrone[[All, 4]][[1]]]*Sin[elettrone[[All, 5]][[1]]];
elettrone[[All, 3]][[1]] -= dx*Cos[elettrone[[All, 4]][[1]]];
with dx=0.0001
. I get the error:
Set::partd: Part specification elettrone[[All,1,n]] is longer than depth of object.
Set::partd: Part specification elettrone[[All,2,n]] is longer than depth of object.
Set::partd: Part specification elettrone[[All,3,n]] is longer than depth of object.
How can this error appear I am not writing elettrone[[All,1,n]]
!
I am using version 11.3 for windows
a[[All, 1]][[2]] = ...
you need to doa[[2, 1]] = ...
. See: Part not behaving the way I expect it to $\endgroup$ReplacePart[]
... $\endgroup$elettrone
. $\endgroup$n
in version 10.2, I get 1, 2, and 3. $\endgroup$