Table component equation uses variable from table

I have a table component and a graph. I want one cell in the table to be a variable (s) which takes its value from a variable in the graph component. In the next table cell I want to type an equation (eg y = 3x + s) so the value of s in the graph component can be used in the equation typed into the table.

Help please!

https://teacher.desmos.com/activitybuilder/custom/5b39d632a4f3817a55d6fae9

You can make s a variable in your function by adding a little to your script:


you’ll have to add a little bit to your graph as well:
02%20PM

make s equal to your scale factor variable and it should all connect

Thanks for replying so quickly Jay! To be clear, I need to add the “x”, “s” bit in my Graph script and change y=h((x) to y=h(x,s) in my Graph?

I’ve set s equal to the scale factor in the Table script:
s = CaveGraph2.number(“s_f”)
cellContent(1,2):“s”

It still doesn’t seem to work - when I add an s into one of the equations in the table (eg from y=2x+13 to y=2x+13/s) the graph disappears… Ami I still missing something, or have I put code in the script of a wrong component?

Here’s a working copy:

There are a few things to consider when entering the functions:

If you want to use your format you’ll need a second variable in there…
31%20PM

…or you could just use y=
42%20PM

… or just the expression.
47%20PM

It’s always something simple (that makes you feel a bit dumb!). All fixed - thanks so much for your help!