Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I am getting error for Q

조회 수: 1 (최근 30일)
MOHINI MODI
MOHINI MODI 2017년 8월 5일
마감: MATLAB Answer Bot 2021년 8월 20일
I am not sure, what value is needed for "Q". One in code is giving me error saying "Subscript indices must either be real positive integers or logicals."

답변 (1개)

Rohan Kale
Rohan Kale 2017년 8월 5일
Firstly, as far as the error is concerned, to access any element of an array, its index has to be an integer, not a real number (which is according to your code). Secondly, why do you have to define a separate array for Q , instead use function * qfunc()* to compute CDF of the random variable.
  댓글 수: 2
MOHINI MODI
MOHINI MODI 2017년 8월 5일
Using qfunc() giving same error.
Rohan Kale
Rohan Kale 2017년 8월 5일
why do you require x? you already have defined EbNo array ,i.e., 0:10. As far as theory goes, BER = Q(sqrt(Eb/No)). Just use qfunc(sqrt(EbNo)). NOTE : as far ar error is concerned, see my last reply.

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by