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

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

FedexRight
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

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

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

 

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

answer to FedexRight.jpg

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

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

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

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

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

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

 

Announcements