フィルターのクリア

How can I generate a pseudo random column vector V

1 回表示 (過去 30 日間)
Ihor
Ihor 2022 年 12 月 5 日
回答済み: C B 2022 年 12 月 5 日
How can I generate a pseudo random column vector V of varying length L (where L will be changing in a cycle)?

採用された回答

C B
C B 2022 年 12 月 5 日
% Define the minimum and maximum values of L
L_min = 10;
L_max = 100;
% Generate a random integer value for L within the defined range
L = randi([L_min, L_max]);
% Generate a column vector V of length L filled with pseudo-random values
V = rand(L, 1)
V = 56×1
0.4516 0.6653 0.2829 0.0852 0.6046 0.6800 0.7785 0.0393 0.4937 0.1070

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by