# Function from Table component

**URL:** https://cl.desmos.com/t/function-from-table-component/2516
**Category:** Questions
**Created:** [January 30, 2021, 3:52am UTC](https://cl.desmos.com/t/function-from-table-component/2516 "2021-01-30T03:52:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Itzik.M\_Ort](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/itzik.m_ort/32/2042_2.png) [@Itzik.M\_Ort](https://cl.desmos.com/u/Itzik.M_Ort)
#### Post date: [January 30, 2021, 3:52am UTC](https://cl.desmos.com/t/function-from-table-component/2516/1 "2021-01-30T03:52:34Z")

</div>

I would like to pass a function to a Graph from a table component. Each line is a different function.  
Is it possible and how?

Thanks  
Itzik

---

<div class="post-metadata">

### Author: ![Susan\_Lauer](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/susan_lauer/32/1832_2.png) [@Susan\_Lauer](https://cl.desmos.com/u/Susan_Lauer)
#### Post date: [January 31, 2021, 3:52pm UTC](https://cl.desmos.com/t/function-from-table-component/2516/2 "2021-01-31T15:52:01Z")

</div>

In your **Graph CL** , put something like this:

```auto
rawExpression("a"):T1.cellContent(1,1) 
rawExpression("b"):T1.cellContent(2,1) 
rawExpressionColor("a"): "grey"
rawExpressionColor("b"): "blue"

```

---

<div class="post-metadata">

### Author: ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)
#### Post date: [January 31, 2021, 5:15pm UTC](https://cl.desmos.com/t/function-from-table-component/2516/3 "2021-01-31T17:15:30Z")

</div>

rawExpression was deprecated, but left so prior activities don’t break.

@Itzik.M_Ort  
If they’re in function form, in the graph CL, simply use:

```auto
function(`f`): simpleFunction(tableName.cellContent(1,1))

```

This will accept `y=`, function form, or just an expression.  
If you want it graphed, in the actual graph add:

```auto
y=f(x)

```

Functions need unique names. You can choose the color of your functions by defining `f(x)`, selecting the color for `y=f(x)`, then deleting the dummy `f(x)`.

---

<div class="post-metadata">

### Author: ![Itzik.M\_Ort](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/itzik.m_ort/32/2042_2.png) [@Itzik.M\_Ort](https://cl.desmos.com/u/Itzik.M_Ort)
#### Post date: [February 2, 2021, 4:13am UTC](https://cl.desmos.com/t/function-from-table-component/2516/4 "2021-02-02T04:13:37Z")

</div>

Hello Susan and Daniel

I’ve tried the “simplefunction” but it didn’t work. I’ve notice two differences.

1. I didn’t omit the ’ ," x") ’ parameter at the end of the syntax.
2. I do want to depict the graph. I used in the Graph Calc just f(x) or y=. what is the differences between f(x) = and y=f(x).

Thanks for your proffetional support which make Desmos my preferable platform.

Itzik.

בתאריך יום א׳, 31 בינו׳ 2021, 19:25, מאת Daniel\_Grubbs via Desmos Activity Builder Support ‏\<[desmos@discoursemail.com](mailto:desmos@discoursemail.com)\>:

---

<div class="post-metadata">

### Author: ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)
#### Post date: [February 2, 2021, 6:23am UTC](https://cl.desmos.com/t/function-from-table-component/2516/5 "2021-02-02T06:23:29Z")

</div>

I’m not sure without a looking into the code in your activity (which you can share), but…

1. simpleFunction defaults to in terms of x, so adding the second parameter is not wrong, it’s just unnecessary.

2. I’m not entirely sure the why. I know that if you have just f(x)= in the graph, it will not graph it. Adding `y=f(x)` just ensures that it is graphed. Similarly, `0=f(x,y)` for a difference function (handy if you expect vertical lines as a possible entry).
