0
votes

I'm using syms variables so i can store the functions or polynomial for later calculation in script file.

The problem is when i use subs to put value of syms variable into function or polynomial,it doesn't solve the functions completely.like

>>syms x
>>subs(x^2-x,x,2)
ans =

6    (Complete solved)

but

>>subs(sin(x),x,2)
ans =

sin(2)    (Not completely solved)

i want ans like

>>sin(2)

ans =

0.9093

What should i use?? please help me.

1

1 Answers

1
votes

I Used VPA(Variable-precision arithmetic) function to make it work.now if

>>vpa(subs(sin(x),x,2),5)
ans(x) =

0.9093