unable to evaluate the function to numeric values - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : unable to evaluate the function to numeric values

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

Error, empty plot

 

Description

Examples

See Also

Description

Note: For users of Maple 13 and earlier versions, this warning occurs when you create a Maple plot without points, curves, or surfaces.  In the warning message, "function" refers to the function being plotted (expressed as an algebraic expression or procedure) and "region" refers to the plotting domain.

 

Verify that you are using the correct syntax for the plotting command and that the function values are real numbers in the specified region.

Examples

Example 1: 3-D plot of a function

hx,yx2 cosy

h:=x,y→x2cosy

(2.1)

plot3dh,x=2..2,y=2 π..2 π

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

Solution 1: Specify hx,y rather than h in the plot3d calling sequence.  This solution uses an expression (x2 cosy) as the argument to the plot3d command.

plot3dhx,y,x=2..2,y=2 π..2 π

Solution 2: To plot the function h, leave h in operator form and use the second calling sequence listed on the plot3d help page.

plot3dh,2..2,2 π..2 π

Example 2: Expression with non-real values

plotx, x=10..1;

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

In the range given, the solutions for the function x are all complex values that cannot be plotted with the plot command.

Solution:  Change the range to one for which the expression is real-valued.

plotx, x=0..10;

Alternatively, to plot in the complex plane, use plots[complexplot].

 

Example 3: Additional parameter not given numerical value

plotx+y, x=1..1;

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

The expression to be plotted includes two unknowns, but plot expects only one unknown..

Solution 1: To plot this expression, replace y with a numeric value.

plotx+1, x=1..1;

Solution 2: To create a 3-D plot of this expression, use plot3d and specify a range for y.

plot3dx+y, x=1..1,y=1..1;

Example 4: Independent variable not specified

plotx+1, 1..1

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

Solution: To plot this function, explicitly assign the range to x.

plotx+1, x=1..1

 

Important: Previously in Maple 10, you had to specify a range when entering a plot.
Example 5 (Maple 10): Function has not been assigned to anything

plotf

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

Error, empty plot

Here,  plot(f) is interpreted as operator-form and a default range of -10..10 is assumed. The error occurs because f has not been assigned to anything.

Example 5 (Maple 11 and later): You can enter a plot without having to specify a range.

Here, f is interpreted as the independent variable.  A default range of -10..10 is assumed.

plotf

See Also

plot, plot3d, plots[complexplot]