How to create a random n matrix with out any conditions

1 回表示 (過去 30 日間)
Hajar Alshaikh
Hajar Alshaikh 2022 年 11 月 17 日
回答済み: William Rose 2022 年 11 月 17 日
I know that I can create a random n matrix by using the code rand(n), but this matrix entries will be all between zero and one.
what I want is to creat random matrix with out any condition and it can take a value grater than 1 and less than zero

採用された回答

William Rose
William Rose 2022 年 11 月 17 日
There is no way to create random numbers that are truly "without any condition". You can create random numbers that have a specified probability distribution. Use randn() for normally distributed random numbers that can range from -Inf to +Inf.
A=randn(4,6); %create 4x6 array of normally distributed random numbers
Good luck.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by