unable to plot graph for the code
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
hello all,
i am unable to plt graph for below code:
L=16;
subplot(1,1,1);
for SNR = 0:2:-20
snrlinear = 10.^(SNR./10); % Linear Value of SNR
Pd_the = marcumq(((1.6336 - (snrlinear + 1)).*sqrt(L))./(sqrt(2).*(snrlinear + 1)));
plot(SNR,Pd_the,'green');
end
please guide
댓글 수: 0
답변 (1개)
Image Analyst
2014년 2월 3일
0 개 추천
You never enter the loop because 0:2:-20 doesn't happen. It goes 0,2,4,6,8,10 etc. but that is in the opposite direction of -20 which means that it never happens - your for loop index is an empty matrix so it never enters.
댓글 수: 1
Wayne King
2014년 2월 3일
You also have issues with marcumq(). marcumq() (if it is the MathWorks' version) takes a minimum of two input arguments
y = marcumq(10,20);
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!