Generate an Array of Random Strings

バージョン 1.0.1 (3.91 KB) 作成者: Darin Koblick
Want to generate a password with specific upper/lower case and wild character requirements? Perhaps quickly determine a unique file name?
ダウンロード: 85
更新 2020/2/26

ライセンスの表示

This routine will generate a random string sequence consisting of the same number of characters and/or numbers as specified by the dimension input.

The calling syntax consists of a desired array dimension followed by the singleton dimension identifier such as:

strchar = randstr(dim,dim3);

where dim represents the dimensions of the character output array, strchar and dim3 specifies which dimension determines the string.

Example function call:
>> strchar = randstr([2 5],2,'useWildCards',false);
>> strchar = 2×5 char array
'TXdaE'
'fxCPo'

There are four optional argument inputs which can be either boolean or integer values. These input arguments determine the requirements of the randomly generated character string:

- useDigits specifies how many numbers to use in the randomly generated string of length dim(dim3)

- useWildCards specifies how many wild card characters to use in the randomly generated string of length dim(dim3)

- useLowerCase specifies how many lower case characters to use in the randomly generated string of length dim(dim3)

- useUpperCase specifies how many upper case characters to use in the randomly generated string of length dim(dim3)

引用

Darin Koblick (2024). Generate an Array of Random Strings (https://www.mathworks.com/matlabcentral/fileexchange/74356-generate-an-array-of-random-strings), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2019a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersLow-Level File I/O についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.1

Added a random string photo!

1.0.0