File Exchange

image thumbnail


version (1.27 KB) by Elmar Tarajan
PASSCODE creates a modal dialog box that returns user password input like in usual Windows dialogs.


Updated 03 Mar 2008

No License

answer = PASSCODE
creates a modal dialog box that returns user password input. Given characters are substituted with '*'-Signs like in usual Windows dialogs.

answer = PASSCODE
without input parameter allows to type any ASCII-Character
answer = PASSCODE('digit')
allows only digits as input characters [0-9]
answer = PASSCODE('letter')
allows only letters as input characters [a-z_A-Z]
answer = PASSCODE(<string>)
allows to use characters from the specified string only

See also PCODE.

Cite As

Elmar Tarajan (2020). passcode (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Thank you!

Philip G

Works on R2017b. Perfect!

Perfect! works fine with Matlab 2018a + ubuntu

Its Great! Thanks Elmar. I need to upload an image( For finger print identification) can u code for this.

Please note the image can be of any size.
Thanks in advance.

This works great! Thanks Elmar.

Elmar Tarajan

new version 2.4 available...

Frank Hadjigeorgiou

Great job! Very useful


- small bug fixed

improved version 1.2.
support certain, user defined, characters for input.

nothing important.
Just a better gui-optic.

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: GetAuthentication, passwordUI