random matrix with fix data
이전 댓글 표시
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
2013년 1월 1일
s=rng;
randn(4)
rng(s),
randn(4)
댓글 수: 2
som
2013년 1월 1일
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
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!