Issue in ploting a bar graph using for loop

조회 수: 2 (최근 30일)
jeffin
jeffin 2018년 11월 24일
답변: jeffin 2018년 11월 24일
i need to plot a bar graph for set of values. i have used for loop.
for
....
plot(ss,meanDiffX);
xlabel('Tiempo (ms)'); ylabel('Variables');
...
end
untitled.png
I am not getting any errors. But my output figure is blank.
I am expecting a figure in this pattern.
untitled.png
Help me where am i missing. Thanks in advance.
  댓글 수: 5
jeffin
jeffin 2018년 11월 24일
Thanks for your reply @madhan.ravi.
I have got the answer. I should use
bar(ss,meanDiffX); instead of plot(ss,meanDiffX);.
madhan ravi
madhan ravi 2018년 11월 24일
so put it in answer section and accept the answer so that people having the same question will find the answer

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

채택된 답변

jeffin
jeffin 2018년 11월 24일
Thanks for your reply @madhan.ravi.
I have got the answer. I should use
bar(ss,meanDiffX); instead of plot(ss,meanDiffX);.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by