Ascii to number/decimal

Hi, ive read in a number into a file using regexp to find numbers from a string of data
so far i have a variable: s=2.50000
now if i try to manipulate this number for example s*2 i get the following answer:
"ans = 100 92 106 96 96 96 96 96"
im aware that this is ASCII format for the number but i cant work out how to change variable S into a normal number i can manipulate

 採用された回答

Tom
Tom 2012 年 9 月 25 日

0 投票

str2double(s)
or
str2num(s)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Type Conversion についてさらに検索

タグ

質問済み:

2012 年 9 月 25 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by