I made a standalone application to randomly generate string but the app always return the same string

2 次查看(过去 30 天)
I made a function that fully works :
function generer_mdp()
liste = ['a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' ...
'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z' ...
'0' '1' '2' '3' '4' '5' '6' '7' '8' '9' '%' '!' '?' '#' '-' '_'];
numChar = input('Combien de charatère ? ');
mdp = randsample(liste, numChar);
disp(mdp)
end
Each time I run the function I got a new string. This what I expected.
Then I export it to a stand alone application but each time I run the app, the string generated is always the same (the number of charater is respected).
I do not know what to do...

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by