필터 지우기
필터 지우기

Subscript indices must either be real positive integers or logicals

조회 수: 2 (최근 30일)
what should i do to not get this error? >> Subscript indices must either be real positive integers or logicals.
  댓글 수: 1
per isakson
per isakson 2017년 8월 8일
Make sure that the values of sqrt(EbN0) and sqrt(2*EbN0) always are "real positive integers or logicals"

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

채택된 답변

Walter Roberson
Walter Roberson 2017년 8월 8일
Remember,
Q(sqrt(EbN0))
means to take the square root of EbN0, and then try to use that square root as an index into the variable Q (which is a scalar.) There is no implied multiplication in MATLAB: if you want
Q .* sqrt(EbN0)
then you have to write that.
  댓글 수: 2
MOHINI MODI
MOHINI MODI 2017년 8월 8일
Thank you very much for helping me. I really appreciate your help. I tried running => Q .* sqrt(EbN0) Still i am getting error >> Subscript indices must either be real positive integers or logicals.
the cyclist
the cyclist 2017년 8월 8일
편집: the cyclist 2017년 8월 8일
It looks like you ran that in the command window, but you did not actually fix line in your script g.m. You need to edit the script before you run it.
Also, you will need to fix the next line
Q .* sqrt(2*EbN0)

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

추가 답변 (2개)

the cyclist
the cyclist 2017년 8월 8일
It looks like you have somehow created a variable with the name sqrt, and you are inadvertently accessing that variable, rather than the sqrt function.
  댓글 수: 3
the cyclist
the cyclist 2017년 8월 8일
Ah, you are right. I missed the evidence that the workspace didn't have an sqrt variable.
MOHINI MODI
MOHINI MODI 2017년 8월 8일
편집: MOHINI MODI 2017년 8월 8일
Hello Sir, Thank you very much for helping me. sqrt is matlab function i am using and Q is input signal, which is '1'

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


MOHINI MODI
MOHINI MODI 2017년 8월 10일
I got the graph, i was expecting. Thank you very much.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by