Hello colleagues, please help me understand the message, I got from Mathematica.
I have a set of points imported from a file. It is list of { x , y } coordinates.
uzly = Import["nodes.dat"];
uzly[[1]] (* coordinatws of node no 1 *)
{0., 0.}
Dimensions[uzly]
{56, 2}
Second dataset describes which nodes are connected into a elemet (a tringle)
prvky = Import["elements.dat"];
prvky[[1]] (* three nodes of element no 1 *)
{1, 5, 6}
Dimensions[prvky]
{78, 3}
I want to prepare polygons, that meansI want the three numbers in each element substitute with coordinates of the nodes with this numbers
I used a code
prvkyxy =
prvky /. {ni_, nj_, nk_} -> {uzly[[ni]], uzly[[nj]], uzly[[nk]]}
and the result seems to be OK:
prvkyxy[[1]] (* three {x y} coordinates of nodes of element no 1 *)
{{0., 0.}, {0.0111111, 0.}, {0.0111111, 0.0166667}}
Dimensions[prvkyxy]
{78, 3, 2}
But by applying the rule, I also got a message
Part::pspec: Part specification ni is neither a machine-sized integer nor a list of machine-sized integers. >>
Part::pspec: Part specification nj is neither a machine-sized integer nor a list of machine-sized integers. >>
Part::pspec: Part specification nk is neither a machine-sized integer nor a list of machine-sized integers. >>
General::stop: Further output of Part::pspec will be suppressed during this calculation. >>
which I cannot understand. The numbers are not out of bounds, the values of prvky are really integers and the result is what I am awaitng - so what is the problem? Why I got the message and what does it means?
Thanks!