MATLAB: I want this string to be different every time.

strings

How

Best Answer

n = number of values to generate
b = round(rand(1,n)); % vector randomly filled with 0's and 1's
s = char(b+'0'); % a character string version of b
Related Question