필터 지우기
필터 지우기

matlab error

조회 수: 1 (최근 30일)
mohan gopal
mohan gopal 2011년 11월 8일
respected sir/mam
i have formulated coding for rayleigh fading algorithm in matlab
for i=1:25
g(i)=(h2(i)^2)/(h1(i)^2);
disp(abs(g(i)));
R(i)=log2(1+(1*abs(h1(i)^2)/0.2*abs(h4(i)^2)));
disp(R(i));
plot(abs(g(i)),abs(R(i)));
end
i got the x and y values plotted in the output but no plotting of values in graph pls help me simulate this prblm , thanks in advance

답변 (1개)

Image Analyst
Image Analyst 2011년 11월 8일
You would need to call "hold on" after you've made the first call to plot. Otherwise a new call to plot blows away your previous stuff.
But rather than plotting each and every point one at a time, I'd recommend plotting the whole array in one single call to plot() after your loop has finished.
Also, I believe you can edit your post to pick a more descriptive subject line than "matlab error" such as "plotting trouble" or something like that.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by