I am trying to make a table where students type in a value for x and the table gives the students the output. No matter what students type in for the radical function, it always returns undefined. Here is my code:
f = simpleFunction(“sqrt(21 - 2x)”)
g = simpleFunction(“x - 3”)
cellContent(1,2): when isUndefined(this.cellNumericValue(1,1)) “” otherwise ${f.evaluateAt(this.cellNumericValue(1,1))}
cellContent(1,3): when isUndefined(this.cellNumericValue(1,1)) “” otherwise ${g.evaluateAt(this.cellNumericValue(1,1))}
cellContent(2,2): when isUndefined(this.cellNumericValue(2,1)) “” otherwise ${f.evaluateAt(this.cellNumericValue(2,1))}
cellContent(2,3): when isUndefined(this.cellNumericValue(2,1)) “” otherwise ${g.evaluateAt(this.cellNumericValue(2,1))}
cellContent(3,2): when isUndefined(this.cellNumericValue(3,1)) “” otherwise ${f.evaluateAt(this.cellNumericValue(3,1))}
cellContent(3,3): when isUndefined(this.cellNumericValue(3,1)) “” otherwise ${g.evaluateAt(this.cellNumericValue(3,1))}
I have changed the radical function to linear and it works fine so I think it’s something with the simple function feature.