MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simple Solve Question


>Dear MathGroupers-
>
>    I have a very simple question.
>Why when you issue
>
>Solve[5 x==10, x]
>
>Does MMA return:
>{{x->2}}
>
>I'm wondering why it's List[List[...]].
>
>I hate using Flatten to get rid of this nested List.
>
>Thanks in advance,
>Daryl

Hello Daryl, instead of writing:

Flatten[Solve[5 x==10, x]]

you can write:

Solve[5 x==10, x][[1]] or x/.Solve[5 x==10, x][[1]]

bye

|Gustavo Delfino          |gdelfino at dino.conicit.ve|
|Universidad Metropolitana|  CompuServe: 73000,1127|
|Ingenieria Mecanica      |      FAX:(582) 963-7726|
|Caracas, Venezuela       |                        |




  • Prev by Date: Re: Mutiple delete in lists
  • Next by Date: FindMinimum in specified range if gradient cannot be found symbolically
  • Previous by thread: Re: Mutiple delete in lists
  • Next by thread: Re: Re: Simple Solve Question