Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Vijay
Posts:
91
Registered:
8/31/11


Re: convert a single quotation variable to a normal variable,
Posted:
Jul 28, 2012 5:21 PM


"Barry Williams" <barry.r.williamsnospam@saic.com> wrote in message <jur59k$li5$1@newscl01ah.mathworks.com>... > "vj " <vijay.easwari@gmail.com> wrote in message <jur02o$50m$1@newscl01ah.mathworks.com>... > > Hi, > > > > I have a variable '56', I would like to convert it to 56, can anyone help me on this? > > Thank you. > > You don't have a lot of additional explanation here, but it appears that you have an integer, single, or double precision number stored as a string variable. What you need to do to convert it depends upon the type of variable and the final numeric data type you need. Some possibilities: > > newVar=str2num(cell2mat(cellVar)); % If the number is stored as in a cell as a string > newVar=str2num(strVar); % If stored as a string array > > Barry
thank you Barry..



