random matrix with fix data
조회 수: 1 (최근 30일)
이전 댓글 표시
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,
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 1월 1일
s=rng;
randn(4)
rng(s),
randn(4)
댓글 수: 2
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 Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!