i have two number i want choose one of them randomly!

6 次查看(过去 30 天)
i have two string number i want choose one of them randomly can you help me please?

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-12-29
编辑:Azzi Abdelmalek 2013-12-29
str={'10' '20'}
idx=randi(2)
out=str(idx)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 String Parsing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by