I want this string to be different every time.

 Accepted 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

2 Comments

i want to put the different strings in matrix and i can not. I want the cells of that matrix ro have the prices of a different string in each cell.That is my problem
Can you provide a small example of the result you want?

Sign in to comment.

More Answers (1)

Categories

Tags

Asked:

on 1 Nov 2016

Edited:

on 20 Mar 2017

Community Treasure Hunt

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

Start Hunting!