Example 1: Plotting a complex expression.
The value of is complex, making the expression inside the plot command, complex. Although this example is trivial, this scenario can occur when you inadvertently use a variable name that was assigned another value (complex value in this case) somewhere else in your worksheet.
>
|
|
| (2.1) |
>
|
|
Solution : Change to be real-valued.
>
|
|
| (2.2) |
>
|
|
Example 2: Real-valued expression with non-real values
In the range given, the solutions for the function are all complex values that cannot be plotted with the plot command, resulting in an empty plot.
>
|
|
Solution:
Change plotting range so that only real-values are computed.
Alternatively, to plot in the complex plane, use plots[complexplot].
Example 3: Some real values are computed
In this case, because some real values are computed, the plot is not empty and no warning message is generated.
>
|
|
Solution:
Change plotting range so only real values are computed.
>
|
|
Alternatively, to plot in the complex plane, use plots[complexplot].
Example 4: Procedure returns complex value.
The expression,
>
|
|
| (2.3) |
>
|
|
Solution : Use the plots[complexplot] command.
>
|
|
>
|
|
Example 5:
Similar to the plot command calling sequence, the plot3d command accepts real-valued expressions and plots these expressions over a real range. In this example, the x-values are all negative leading to complex values generated by sqrt(x).
>
|
|
Solution: Change the range for the x variable to be positive values. Alternatively, use the plots[complexplot] command instead.
>
|
|
>
|
|