필터 지우기
필터 지우기

Ascii to number/decimal

조회 수: 59 (최근 30일)
Edward
Edward 2012년 9월 25일
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일
str2double(s)
or
str2num(s)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by