Skip to main content
1-Visitor
Question

'All evaluations resulted in either an error or a complex result

I am getting error as 'All evaluations resulted in either an error or a complex result.

osRszSi

5 replies

23-Emerald V

You have redefined x to become an array, between the definition of F(x) and the plot.

If you move the plot upper left corner to just above the redefinition of x to an array, your plot should show.

The error message "All evaluations..." is cryptic at first sight. In this case case 'all evaluations resulted in an error' applies, because you cannot compare a singular value (such as -1, 2 or 5 with an array (that you redefined x to).

 

Success!

Luc

 

Translate
-MFra-
21-Topaz II

answer to FedexRight.jpg

Translate
23-Emerald V

The definition of F(x) was not the cause of the problem of the OP.

He redefined x to be a 4 element array between the definition of F(x) and the plot (not shown in his picture). That would fail with your definition of F(x) as well.

 

Luc

Translate
-MFra-
21-Topaz II

You're absolutely right. My answer is based on what the photo shows. Only now I have opened the file provided by FedexRight.

Translate
Werner_E
25-Diamond I

Luc already explained why your plot failed - the definition of x as a vector.

Here are a few more suggestions and an explanation, why F(x) fails if x is a vector.
If you are new to this, I understand that the difference between a range and a vector can be quite confusing.

Werner_E_0-1591558497589.png

MC15 worksheet attached

 

Translate