### How to convert a symbolic expression to a Octave function from the Symbolic Package?

After installing the symbolic package on octave with `pkg install -forge symbolic`. Using the symbolic package on octave I may write this:

```
octave> pkg load symbolic;
octave> a = sym( "a" );
octave> int ( a^2 + csc(a) )

```

which will result in:

```
ans = (sym)

   3
  a    log(cos(a) - 1)   log(cos(a) + 1)
  -- + --------------- - ---------------
  3           2                 2

```

But how to do this Integral (int(1)) symbolic result just above to became a valuable function like this below?

```
function x = f( x )

    x = x^3/3 + log( cos(x) - 1 )/2 - log( cos(x) + 1 )/2

end

f(3)

# Which evaluates to: 11.6463 +  1.5708i

```

I want to take the symbolic result from `int ( a^2 + csc(a) )`, and call result(3), to compute it at 3, i.e., return the numeric value 11.6463 + 1.5708i, from the symbolic expression integral `a^2 + csc(a)`. Basically, how to use the symbolic expression as numerically evaluable expressions? It is the as [this other question](https://stackoverflow.com/questions/32364660/matlab-how-do-i-convert-multivariable-symbolic-expression-to-a-function-that-fm) for Matlab.

References:

1. <http://octave.sourceforge.net/symbolic/index.html>
2. [How do I declare a symbolic matrix in Octave?](https://stackoverflow.com/questions/2472486/how-do-i-declare-a-symbolic-matrix-in-octave/40824167#40824167)
3. [Octave symbolic expression](https://stackoverflow.com/questions/32068222/octave-symbolic-expression)
4. [Julia: how do I convert a symbolic expression to a function?](https://stackoverflow.com/questions/27357579/julia-how-do-i-convert-a-symbolic-expression-to-a-function)
5. [What is symbolic computation?](https://stackoverflow.com/questions/16395704/what-is-symbolic-computation)