Group Abstract Group Abstract

Message Boards Message Boards

Get solutions from NSolve in a consistent manner

Posted 5 years ago
POSTED BY: Robert Poenaru
2 Replies
Posted 5 years ago

Hi Robert,

I would not rely on the position being consistent. Much better to use replacement to get the order you want.

sol = {{z -> 1.80464, y -> 0.0250839, x -> 0.0540758}};

{x, y, z} /. sol
(* {{0.0540758, 0.0250839, 1.80464}} *)

{y, x, z} /. sol
(* {{0.0250839, 0.0540758, 1.80464}} *)
POSTED BY: Rohit Namjoshi

Ooops...I see that there is no horizontal scroll here?! So my code doesn't show up properly on the page?

POSTED BY: Robert Poenaru
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard