General--IF condition in Plot3D
- To: mathgroup at smc.vnet.net
- Subject: [mg68972] General--IF condition in Plot3D
- From: madhukarrapaka at yahoo.com
- Date: Sat, 26 Aug 2006 02:03:54 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi All, How to use a IF condition in Plot3D?? For example: I have "I" values caluclated by I=P/2*Pi*r*L .; where P=10.3,L=0.45,r=dist. So if i want to plot "I" when "r<x", how to do it?? (Here i am giving my procedure thru which i am getting a Plot with some warning) r[x_,y_]:=Sqrt[x^2+y^2]; I[x_,y_]:=P/2*Pi*r[x_,y_]*L Plot3D[If[r[x,y]<=0.082,I[x,y]],{x,-0.082,0.082},{y,-0.082,0.082}] Then i am getting following warnings: 1. Plot3D::"plnc" : If[(r[x, y]<=0.82),I[x, y] is neither a machine-size real number at {x,y}=(-0.058,-0.082) nor a list of a real number and a valid color directive. 2. General::"stop": Further output of Plot3D :: plnc will be suppressed during this calculation. 3. Plot3D::"gval": Function value (Null) at grid point xi = 1, yi = 1 is not a real number. 4. General::"stop": "Further output of Plot3D :: gval will be suppressed during this calculation." Is there anything wrong in the syntax or range specification. I am clueless. Please provide me ur valueable suggestions. Thanks in advance. Thanks in advance Link to the forum page for this post: http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=12975#p12975 Posted through http://www.mathematica-users.org [[postId=12975]]