randi size inputs not scalar issue?

1 回表示 (過去 30 日間)
Giuseppe
Giuseppe 2014 年 5 月 1 日
編集済み: Giuseppe 2014 年 5 月 1 日
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 Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by