random numbers in Matlab 2009

my matlab version is 2009 and the command rang default dont work what is the alterative command ?

1 件のコメント

samah samir
samah samir 2020 年 12 月 15 日
rng('default') this command i want the alterative command in version 2009

サインインしてコメントする。

回答 (2 件)

John D'Errico
John D'Errico 2020 年 12 月 15 日
編集済み: John D'Errico 2020 年 12 月 15 日

1 投票

There is no alternative, since rang does not appear to be a MATLAB function, nor was it ever a MATLAB provided function. I also cannot find a function namd rang in any matlab toolbox.
Perhaps you were really thinking of tools like rand, randn, rng, etc., and just mistyped it, or were told to use the wrong funtion in error?
Perhaps somebody else wrote a function called rang, that you used in some older release?
We cannot know which it is, but probably one of the above is the case.

1 件のコメント

samah samir
samah samir 2020 年 12 月 15 日
rng('default') this command i want the alterative command in version 2009

サインインしてコメントする。

Steven Lord
Steven Lord 2020 年 12 月 15 日

1 投票

The rng function was introduced in release R2011a to make it easier to control the pseudorandom number generators used by rand, randn, and randi. You'll need to use the older syntaxes rng was created to replace if you want to continue using that old release, but as there have been many improvements to MATLAB over the last decade I recommend that you seriously consider upgrading to a more recent release.

1 件のコメント

samah samir
samah samir 2020 年 12 月 15 日
my labtob is very weak

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeRandom Number Generation についてさらに検索

質問済み:

2020 年 12 月 15 日

コメント済み:

2020 年 12 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by