MATLAB Answers

Issue in ploting a bar graph using for loop

13 views (last 30 days)
jeffin
jeffin on 24 Nov 2018
Answered: jeffin on 24 Nov 2018
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 Comments

Show 2 older comments
madhan ravi
madhan ravi on 24 Nov 2018
so upload the values to test because till now your question is vague without datas
jeffin
jeffin on 24 Nov 2018
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 on 24 Nov 2018
so put it in answer section and accept the answer so that people having the same question will find the answer

Sign in to comment.

Accepted Answer

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

  0 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!