MATLAB: HOw can i take integration using gui

typeerror

what i am doing is
syms x
eval(int(x,0,1))
It is correct without using gui but wrong when we use gui. Can you tell why.

Best Answer

You should never eval() a symbolic expression: symbolic expressions use a slightly different programming language than MATLAB uses. Instead you should subs() values in for symbolic variables, or double() to convert constant symbolic expressions into double precision numbers.