フィルターのクリア

Why is the use of randn in matlab?

1 回表示 (過去 30 日間)
D Joseph
D Joseph 2015 年 8 月 15 日
コメント済み: D Joseph 2015 年 8 月 17 日
sig = 0.05;
randn('seed', 0); % generate seed
x = im + sig*randn(size(im)); % noisy observation
What is the need of seed generation in this code? Here im represents an image.

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 8 月 15 日
編集済み: Walter Roberson 2015 年 8 月 15 日
Gaussian noise is random by definition. If there were a pattern to it then it would be some other kind of noise.
In particular it is Normal Distribution noise as opposed to uniform random
  1 件のコメント
D Joseph
D Joseph 2015 年 8 月 15 日
Thanks @Roberson

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


Steven Lord
Steven Lord 2015 年 8 月 15 日
You shouldn't be using that syntax to change generators, for reasons described in the documentation. Use RNG instead.
D Joseph, I've noticed you've been asking a lot of very basic questions. This leads me to think that you're new to MATLAB, am I right? If so, I highly recommend reading through the Getting Started section of the MATLAB documentation (open the documentation by typing "doc matlab" without the quotes in the Command Window then look for the Getting Started link.) That documentation is not too long, and it includes a lot of examples, but it may help you become familiar with the syntax and the general usage of MATLAB.
  1 件のコメント
D Joseph
D Joseph 2015 年 8 月 17 日
Thanks@Steven

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by