counting and plotting elements in a vector
조회 수: 5 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!