randi size inputs not scalar issue?

1 次查看(过去 30 天)
I have an issue when I want a variable length I decided to give two inputs max_length and min_length. I then chose the length in the loop by choosing a random integer between these two. Although when I run it says:
*Error using randi
Size inputs must be scalar.
Could anyone tell me what the problem is.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2014-5-1
编辑:Azzi Abdelmalek 2014-5-1
randi(length(characters ), 1, (passwd_length-1))
passwd_length-1 should be a scalar not a vector

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by