MathGroup Archive 1997

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

Search the Archive

Re: Solve and Plot

  • To: mathgroup at
  • Subject: [mg6536] Re: [mg6512] Solve and Plot
  • From: penny at (Des Penny)
  • Date: Mon, 31 Mar 1997 23:01:36 -0500 (EST)
  • Sender: owner-wri-mathgroup at

>I would like to solve an equation and then plot the solution. The command :
>How can i do my plot in a one line command ?
>* Michel Gosse               | Email   : michel.gosse at *


Plot has a HoldAll attribute and so will not evaluate any of its arguments.
In this case you must force it to evaluate its first argument. The
following code will therefore do what you want:

Plot[Evaluate[ y /. Solve[3x+2y-4==0,y][[1]] ], {x,-5,5}];


Des Penny

Des Penny
Physical Science Dept.
Southern Utah University
Cedar City, UT 84720

VOICE: (Office): (801) 586-7708
       (Home)  : (801) 586-2286
FAX:    (801) 865-8051
e-mail: penny at

  • Prev by Date: Re: coupled ODE system: won't solve [?]
  • Next by Date: Re: Solve and Plot
  • Previous by thread: Re: coupled ODE system: won't solve [?]
  • Next by thread: Re: Solve and Plot