Borrar filtros
Borrar filtros

problem with histogram, adds last bins

1 visualización (últimos 30 días)
pasta pontikaki
pasta pontikaki el 12 de Abr. de 2019
Editada: pasta pontikaki el 12 de Abr. de 2019
Hi all, i have this histogram which on x-axis have values from angles -90:90 and i also have a threshold thresh= -4
I want to split the histogram into two. The one down form the thresh and the other upper the thresh, so i write the above code:
>> h1=histogram([lines.theta],'BinEdges', -90 : thresh ,'EdgeColor','r');
The problem is tha the last bin is added with the previous one.
For example :
the bin -6 has value 8 which is correct,
the bin -5 has value 13 but the histogram shows that has round 23 because it adds the bins of -5 and the bins of -4. Bin -4 has value 10 so 10+13.
This is happenig whatever right limiit of histogram is. The last bin it is added with the previous one
Has anyone any idea why this is happening?
Also do you know how to put the edges of x-axis under each bin? Because as you can see histogram displays now the range each bin.
  1 comentario
pasta pontikaki
pasta pontikaki el 12 de Abr. de 2019
Editada: pasta pontikaki el 12 de Abr. de 2019
I have the same problem if i use the hist function , not the histogram.
The sub histogram extends from -90:-5
On value -5 the count is 13 but as you can see the result is an inconceivable number =1616

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by