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!