Editor's Note: This was a File Exchange Pick of the Week
This is a login dialog which replaces all characters typed into the password area with asterisks. Both the login and password are returned by the function as strings.
Version information can be found in the m-file. Examples can be found in the m-file help.
Note: The password is only visually hidden. While the dialog is active it is stored in the Userdata of the password edit box.
Jeremy Smith (2021). login (https://www.mathworks.com/matlabcentral/fileexchange/8499-login), MATLAB Central File Exchange. Retrieved .
Inspired: TxtMsg Create, passwordEntryDialog, Biomet Database Tool
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Maybe it worked in earlier versions, but in 2019a password field is not obfuscated, password string is mirrored (when typing 'abc' one will see 'cba'), if something is deleted from the password string - depending on the action several white-spaces are added and the string will be something like 'abc abc'.
Nice but how can i add in one more field "Username" into the codings? i have no idea at all >.<
pls send the activation key fr 2013b version
I am going to do project on Image processing using matlab.Can anyone sir/madam pls tell which topic is better for good results?And explain how to learn matlab code for image processing?
I get an error undefined function gui_main. I am new to matlab. Can someone pls explain how do i use this file.
I have made a myscript.m file that i want now should prompt a user for a password and it should be displayed as encrypted password. At present I tried creating file witht the same code as logindlg to see how it works and if I can call functiosn from thsi file in myscript.m
Pls help.
Muchas Gracias!
A great piece of code. Just a couple of small additions:
pressing the 'delete' key counts as a letter, rather than a eraser. I put the following string in there:
case 'delete'
password = password(1:end-1);
It's basically copying the backspace code, but it kind of makes it look a bit prettier, though don't think it's a full functionality.
Also, clicking the 'cancel' button basically just proceeds with the function. I used close(fig) rather than uiresume(fig) to close the dlg and disable access to the GUI.
File works perfectly. Just have to remembers to clear the username and password before saving anything so that no one can get a hold of your information.
This function may not be secure for the beta release R2011a because the password is not obscured as it is typed. (Mac OSX 10.6.6).
Hi. Great program, it works like a charm. However, I noticed that when I used it to input access details for a database (using the database command) I needed a little pause between using your code and creating the database object - otherwise Matlab (2009b) hangs.
Good one, it helped me a lot ..
its help full but how to interface it with other GUI its good but how to utilizes with others
hi this is a good work.
But i cant run the code and it doesnt work for me in matlab6p1.
is it require an another version.
'Esc' key counts as a blank character. Is there any way to avoid that? Thanks for the great program
Nice and useful application
There is a problem with this script for versions of Matlab before 7.1. The functionality of the 'cellfun' function changes so if you delete lines 45-48 it'll work as it should. Those lines are just responsible for some error checking.
My PC has Matlab ver 7.0.1 and this does not work...Dispalys an error and could not understand how to trouble shoot it. Hope u would help me in this regard....
nice work Jeremy :).......
Thank you very much!
GOOD ONE, GOT WHAT I WAS LOOKING FOR