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