フィルターのクリア

Request user input and using that ans for my functions?

2 ビュー (過去 30 日間)
Gee Cheng Mun
Gee Cheng Mun 2016 年 1 月 15 日
回答済み: Stephen23 2016 年 1 月 15 日
How can I use the user's input and convert it to a numerical value to be used in my remaining codes?
prompt=('Enter a threshold value to convert the grayscale image to black and white: ');
dlg_title=('Threshold level value');
num_lines=1;
defaultans={'0.5'};
answer=inputdlg(prompt,dlg_title,num_lines,defaultans);

採用された回答

Stephen23
Stephen23 2016 年 1 月 15 日
>> val = str2double(answer{1})
val =
3

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by