how to print the entered current key as astrick symbol in inputdlg / commandwindow????

2 ビュー (過去 30 日間)
Dhines
Dhines 2015 年 11 月 4 日
回答済み: Jan 2015 年 11 月 4 日
pwd=input('enter the password: \n','s');
input2=input('enter pwd: \n','s');
b=length(pwd);b1=length(input2);
if ( b==b1 & input2==pwd)
msgbox('correct');
else
msgbox('wrong');
end
when I run this program it asks in command window enter the password. I want to give some characters but it printed in astrick symbols?/
give me your suggestions

回答 (1 件)

Jan
Jan 2015 年 11 月 4 日
There is no chance to create a password input dialog in the command window, which displays asterics instead of the characters. But there are many solutions in the FileExchange. Simply search for them: http://www.mathworks.com/matlabcentral/fileexchange/?term=password
You can download the submissions and either use them directly or learn from the code.

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by