how to plot like in other CAS
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
hi y is a vector whose vlaues can be any value (whole numbers) from range form 0 999999 . total values in y are few thousands. i want to plot those values where x axis should be from 0 999999 and if a vlaue a y value of 1 for each occurance..
so if y=[33333 44432 33333 111111]
the graph x-axis should be from 0 - 999999 and at x=33333 y value should be 1+1 (two occurances) and at 44432 y value should be 1.,
i made x=1:999999; but when i stem y against x lenghts do not match.
how can i zero fil all values that are not present in y . and set y value an increment of 1 for each occurance.
Respuestas (2)
Walter Roberson
el 24 de Mayo de 2016
uy = unique(y);
counts = histc(y, uy);
bar(uy, counts)
Chamjiee Tramadol
el 27 de Mayo de 2016
Editada: Walter Roberson
el 28 de Mayo de 2016
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!