필터 지우기
필터 지우기

random matrix with fix data

조회 수: 3 (최근 30일)
som
som 2013년 1월 1일
Hi all,
I generated A matrix including random and normal variable as below:
A=randn(4);
Whenever I run this command, different data will be generated.
How can I generate A matrix with fixed random variable.
I mean in every running A matrix doesn't change.
Thanks,

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 1일
s=rng;
randn(4)
rng(s),
randn(4)
  댓글 수: 2
som
som 2013년 1월 1일
can you tell me what the 'rng' is? your answer is a bit ambiguse.
Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 1일
편집: Azzi Abdelmalek 2013년 1월 1일
rng restore the original generator settings. Have you tried it? and you can also look at the matlab help
help rng

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by