From: maryam on
Hi everybody,
I want to convert a symbolic varibale in to decimal form, for this I have used below command:
beta=sym(beta,'d');
but there is an error like this:

??? Error using ==> sym.sym
Second argument d not recognized.

Error in ==> deepak3 at 31
beta=sym(beta,'d');
thanks for helping me
From: us on
"maryam " <maryam_tayefi(a)yahoo.com> wrote in message <i1jkbt$oub$1(a)fred.mathworks.com>...
> Hi everybody,
> I want to convert a symbolic varibale in to decimal form, for this I have used below command:
> beta=sym(beta,'d');
> but there is an error like this:
>
> ??? Error using ==> sym.sym
> Second argument d not recognized.
>
> Error in ==> deepak3 at 31
> beta=sym(beta,'d');
> thanks for helping me

firstly, do NOT use BETA as a var name as it's a ML stock function...
now, proper syntax
- according to the docs
....
S = sym(A,flag) converts a numeric scalar or matrix to symbolic form.
....

val=pi/3; % <- a numeric value...
sval=sym(val,'d')
% sval = 1.047197551196597631317786181171 % <- a SYM obj...

us
From: Walter Roberson on
maryam wrote:
> Hi everybody,
> I want to convert a symbolic varibale in to decimal form

vpa() if you want to return a high-precision symbolic number
double() if you want to convert to a floating-point number.