You can protect arguments inside brackets from N with the family of attributes, NHoldAll, NHoldFirst, and NHoldRest.
For an indexed variable such as x[1], x[2], etc., either
SetAttributes[x, NHoldAll] (* what I would normally use *)
or
SetAttributes[x, NHoldFirst] (* protects only the first argument *)
would keep the index from being numericized by N:
N[x[1]]
(* x[1] *)
Attributes of x can be cleared with ClearAttributes[x, <attribute>] or ClearAll[x], but NOT with Clear[x].
Built-in functions that require some or all arguments to be an integer (e.g. Take, Part), an exact number (e.g., AlgebraicNumber), or simply protected from being changed by N (e.g. Subscript) have one of these attributes.
N[expr] /. x[i_] :> x[Round[i]]– Marius Ladegård Meyer Aug 27 '16 at 15:45SetAttributes[x, NHoldAll]? There are alsoNHoldFirst,NHoldRest. – Michael E2 Aug 27 '16 at 16:00