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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

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

FedexRight
1-Newbie

'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 5
LucMeekes
23-Emerald III
(To:FedexRight)

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

 

-MFra-
21-Topaz II
(To:FedexRight)

answer to FedexRight.jpg

LucMeekes
23-Emerald III
(To:-MFra-)

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

-MFra-
21-Topaz II
(To:LucMeekes)

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

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

 

Top Tags