version (1.76 KB) by Elliot Layden
A simple tool to generate highly secure passwords


Updated 1 Feb 2017

View License

This simple tool uses a bank of 96 commonly used lower and upper-case letters, integers, and special characters to randomly generate secure passwords. Password character arrays are randomly chosen from this bank using Matlab's 'randi.m' function, drawing uniformly distributed pseudorandom integers of specified length.
Additional options are included, such as limiting the password bank to only use alphanumeric characters (n = 62, upper & lower case), or disallowing repeated characters. An optional output indicates the number of possible passwords which could be generated using the specified parameters.

Cite As

Elliot Layden (2022). password_gen (, MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!