i have two number i want choose one of them randomly!
6 views (last 30 days)
Show older comments
i have two string number i want choose one of them randomly can you help me please?
0 Comments
Accepted Answer
Azzi Abdelmalek
on 29 Dec 2013
Edited: Azzi Abdelmalek
on 29 Dec 2013
str={'10' '20'}
idx=randi(2)
out=str(idx)
More Answers (0)
See Also
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!