cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

3D plot divide by zero

drhogue-disable
1-Newbie

3D plot divide by zero

I am attempting to plot a function 3D and I get the error "divide by zero". None of the variables can produce a zero in the denominator, and it produces point values without a problem. I am new to Mathcad so I am sure there is something I am doing wrong. Can someone take a look at the attached file and spot the problem?
5 REPLIES 5

Try please to use CreateMesh function: Returns a nested array of three matrices representing the x-, y-, and z-coordinates of a parametric surface defined by the function(s) of two variables in the first argument(s).
Val
http://twt.mpei.ac.ru/ochkov/v_ochkov.htm

How do you know if there is no "Divide by 0" in the default quickplot ? Mesh odd number, maybe also range to escape the "Divide by zero". Only 14 users can read your work sheet, but it shouldn't make any change to what I have described above about the plotting problem.

Valery suggestion is another good way to escape "Divide by 0".

jmG

Why do you say that none of the variables can produce zero in the denominator? That is simply not the case. You will get a zero denominator if the first parameter is zero, or if the second parameter is equal to Ldelta.

Note that the names used for the arguments when defining a function are purely formal names, and have no relationship whatsoever to any similarly named variables defined in the sheet. When doing a quickplot (passing a function to the plot routine) the ranges of the independent variables are set purely by the quickplot tab in the plot properties, not by any variables in your sheet.

You have left the quickplot ranges at the default of -5 to 5, which happens to include zero. Hence the divide by zero.
__________________
� � � � Tom Gutman

Thanks, Tom. That default value of -5 to 5 was it. I thought it was using the values that I assigned to the variables.

On 6/30/2009 4:11:13 PM, drhogue wrote:
>...That default
>value of -5 to 5 was it. I
>thought it was using the
>values that I assigned to the
>variables.
______________________________

The default values are those from the mesh default 20, thus getting a 0 value in the default range of � 5. So, mesh odd number like 19, 21. If you want to have it ranged and meshed externally, then use the function "Createmesh". That will also give you an export, which export you don't have from the quickplot.

jmG



Top Tags