Implement a user defined function that generates matrix of random integers of specified order and range

조회 수: 2 (최근 30일)
I am facing issue in making user defined functions.
  댓글 수: 7
Walter Roberson
Walter Roberson 2019년 1월 16일
(Note: no part of the question has been edited away to date. The sparse question is what was asked.)
(Note: policy is that we do not close questions that have a meaningful answer unless there is compelling or legal reason to do so. However, content may be deleted or edited away if necessary.)

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

답변 (1개)

Steven Lord
Steven Lord 2019년 1월 15일
Implementing the Mersenne Twister (as used by default by rand, randi, and randn) seems like a pretty big task for a homework assignment. If you're looking to implement a pseudorandom number generator as a homework assignment I'd recommend trying something not as sophisticated but also not as complicated. Maybe a linear congruential generator (LCG) or a linear-feedback shift register (LFSR)?
If you try implementing an LCG or an LFSR and encounter difficulty show us what you've implemented and explain in detail where you're having difficulty and we may be able to offer some guidance.

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by