Matlab won't plot anything. please help why?
이전 댓글 표시
clear all;
clc;
u = 7 ;
snrdb = 5;
for pf=0.001:0.01:1;
lamda = 2*gammaincinv((1-pf),u);
gama = db2mag(snrdb);
p = 0:(u-2);
a = exp(-lamda/2);
b = ((1 + gama)/gama).^(u-1);
c = exp(-lamda/(2+2*gama));
x = sum((1./(factorial(p))).*((lamda/2).^p))…
y = sum((1./(factorial(p))).*(((lamda*gama)/… 2*gama)).^p));
s=(a*x)+b.*(c-(a*y));
end
plot (pf,s);
grid on
댓글 수: 2
Wayne King
2012년 4월 8일
Please format your code example
Oleg Komarov
2012년 4월 8일
You're plotting one point not the entire sequence.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Graphics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!