How to do a stem plot for a 4x100 vector value?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi Yall Im very rusty with matlab and Im still quite lost on how to do this
I have this code right now, it woked when i only had one traffic, but now i have 4, all but into the vector x, but I dont know how to seperatly do them all, I know I will need a for loop but thats it, I tried to look up how, but Ive come up short.
N=4; %Nodes number
G=1.0; %Total traffic intensity
p=G/N; %Traffic intensity per node
Tics=100; %The number or clock ticks to simulate
x=rand(N,Tics)<p; %This vector will hold the traffic
stem(x)
ylim([0 1.5])
xlim([0 100])
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Clocks and Timers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!