Supress the error warning in a math input?

Another day, another question! :grimacing:

So I put together this screen to let students input a function, and a value a at which they want to generate values for finding a limit. Is there a way to suppress that error warning in the a= input? It reads “Cannot evaluate expression.”

Or am I using the wrong code here? The only thing I have on the math input is: initialLatex: “a=”. I even tried setting warning: " " but that did not make it go away.

Everything works, and the warning goes away as soon as a value is entered.

Do you have CL for the error message? It’s not a default because I don’t see it in mine.

Sorry, I am not sure what you mean. Here is the activity:

I was an issue with the graph component. Maybe there’s a different way, but this seems to work:
number("a"): simpleFunction(input9b.latex).evaluateAt(1)

1 Like

Also, if you could use conditionals if you don’t want all the initial “NaN”

n = when numericValue("\abs(${ghidden9.number("a")})")>=0 1
      otherwise 0
cellContent(1,1): when n=0 "" otherwise "${ghidden9.number("X[1]")}"

Then cut paste the ‘when n=0 “” otherwise’ into each line.

1 Like

Thank you so much!! That does the trick. I did think it had something to do with the way the input was being “grabbed” but wasn’t sure what to do differently. I tried using input9b.latex but got the warning about “expecting a number”. This works great! :grin:

Ahhhhh great! I was wondering if there was a way to rid myself of all the NaN’s! Had not gotten around to working on it yet. Thanks!

1 Like