how can replace randi instead randint?
조회 수: 4 (최근 30일)
이전 댓글 표시

I need help ,please!
댓글 수: 0
답변 (1개)
Star Strider
2019년 8월 24일
‘Replace all instances of randint with randi.’
댓글 수: 2
Walter Roberson
2019년 8월 24일
That particular use of randint() is a bit unusual. It would translate to
rng(123);
sts_seq = randi([0 1], 1, length(SC_Position)/2) .* 2 - 1;
With 0 or 1 being multiplied by 2 and add 1, then the results would be either -1 or +1.
Star Strider
2019년 8월 24일
@Walter — Thank you!
I don’t have the Communications Toolbox, so I have no experience with it.
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!