Re: Problem with If[] and %
- To: mathgroup at smc.vnet.net
- Subject: [mg5411] Re: Problem with If[] and %
- From: rhall2 at umbc.edu (hall robert)
- Date: Sat, 7 Dec 1996 00:25:37 -0500
- Organization: University of Maryland, Baltimore County
- Sender: owner-wri-mathgroup at wolfram.com
In article <57tl9h$rjm at dragonfly.wolfram.com>, Hans Steffani <hans.steffani at e-technik.tu-chemnitz.de> wrote: > >i^2+v^2 >If[ % >15,15,%] >Plot3D[ %,{i,-5,5},{v,-5,5}] > >Which only leads to several errors. Your original code created an infinite loop. Try Trace[Plot3D[ %,{i,-5,5},{v,-5,5}]] and you can see the same operation being performed over and over again. >What do I have to do? exp = i^2+v^2 If[ exp >15,15,exp] Plot3D[ %,{i,-5,5},{v,-5,5}] -- Bob Hall | "Know thyself? Absurd direction! rhall2 at gl.umbc.edu | Bubbles bear no introspection." -Khushhal Khan Khatak