How to convert string from edit text to dec?

I am reading from an edit text in GUI as below and want to convert this to native:
pressure=get(handles.edit4, 'String');
For example, if '100' is entered I want the output to be '49 48 48'.
I have tried unicode2native but does not seem to work, but works in the command line.
Thanks in advance.

1 件のコメント

Jan
Jan 2012 年 7 月 11 日
Do you want the double vector [49 48 48] or the string '49 48 48' with intermediate spaces?

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 7 月 11 日

0 投票

pressure + 0

1 件のコメント

Jan
Jan 2012 年 7 月 11 日
Or more explicit: double(pressure).

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

タグ

質問済み:

2012 年 7 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by