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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Translate the entire conversation x

The label is undefined

YA_10963798
14-Alexandrite

The label is undefined

Hi there,

Any ideas why this is wrong? I made f as function of M in order to define it 

YA_10963798_0-1764241005355.png

Regards

Yusra

ACCEPTED SOLUTION

Accepted Solutions

You've still got the "=" sign at the end of the function definition, Yusra.  You need to go to the very end of the function definition (Fn-right-arrow), then press Backspace twice.  That should remove the equal sign.

 

Stuart

View solution in original post

6 REPLIES 6

Try getting rid of the following equals sign in the function definition

Fred_Kohlhepp_0-1764246383840.png

 

still the same 

YA_10963798_0-1764254556090.png

 

You've still got the "=" sign at the end of the function definition, Yusra.  You need to go to the very end of the function definition (Fn-right-arrow), then press Backspace twice.  That should remove the equal sign.

 

Stuart

YA_10963798
14-Alexandrite
(To:StuartBruff)

So I can't put (=) in the function . Thank you for that I didn't know  

Now I have this another error that I always get . Can you explain to me how to tackle it 

YA_10963798_0-1764260146276.png

 


@YA_10963798 wrote:

So I can't put (=) in the function . Thank you for that I didn't know  


 

No worries.

 


@YA_10963798 wrote:

Now I have this another error that I always get . Can you explain to me how to tackle it 

YA_10963798_0-1764260146276.png


Without the worksheet, I'd be flying blind, but my first airport of call would be to check whether dzontgr is the same length as g`ontg.

 

Stuart

Werner_E
25-Diamond I
(To:YA_10963798)


@YA_10963798 wrote:

So I can't put (=) in the function .

 


Not after a function DEFINITION.

An = means a numeric evaluation. Which numeric result would you expect here:

Werner_E_0-1764298058276.png

Prime can't know which value to use for "x". Even if a variable "x" is defined in front it won't work, because the "x" used in the right hand side of the function definition is NOT the "x" you may have defined in front but rather is the "x" used on the left hand side of the definition (formal function argument).

So when you DEFINE a function you can't evaluate this definition numerically. But after the definition, when you CALL the function providing a specific value for the formal argument you evaluate this function call numerically.

Werner_E_1-1764298365965.png

Actually you CAN evaluate a function definition using symbolic evaluation.

Werner_E_2-1764298431991.png

But this will not always work OK. If the function definition contains a boolean expression using the function argument(s) it can't decide its truth value without knowing specific values and so will refuse to evaluate symbolically

Werner_E_3-1764298609169.png

 


Now I have this another error that I always get . Can you explain to me how to tackle it 

YA_10963798_0-1764260146276.png


I also suspect that vector dzontgr contains not more elements than vector σ'ontg.

So when in your loop "i" reaches the index of the last value of σ'ontg, there is no element with index i+1 in vector dzontgr.

Probably the same applies to vector γ'ontg.

If all the mentioned vectors are of the same length the error should go away if you use    for i ∈ ORIGIN..last(σ'ontg)-1

The resulting vector returned by your function will have one element less than the vectors used. You have to decide if that's what you need.

Announcements

Top Tags