counting and plotting elements in a vector
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hi there, i want to count the number of elements in a vector and plot it right away. ex: v = [2,3,2,4,5,6,5,6,7,] the out put should be plotted right away. so the a plot should be made whos x-axis extends from 1 - 10 (y depends on counts so doesnt matter) so for the first plot, since there are no 1s...no count(or 0) is plotted then that plot is held and the count of 2 is plotted so it will be one, then next is 3 - one again, next is 2 in the vector but now we have gone up to count two so two is plotted and so on. so basically i want to plot the counts as the loop is run through the vector and the plot is updated with each loop. any help would be appreciated. thanks
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Graphics Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!