Borrar filtros
Borrar filtros

Finding the edges of equally distanced bins

3 visualizaciones (últimos 30 días)
wesso Dadoyan
wesso Dadoyan el 4 de Ag. de 2015
Respondida: Image Analyst el 5 de Ag. de 2015
I am using 2014a version which doesn't have the histcounts function. Is there a way to find the edges of 10 equally distanced bins in a histogram other than the histcounts function?

Respuesta aceptada

Image Analyst
Image Analyst el 5 de Ag. de 2015
[counts,centers] = hist(data, nBins);
So you know the centers. And that means you know the width
binWidth = centers(2)-centers(1)
So the left most edge is just centers - binWidth/2 and the right most edge is centers(end)+binWidth/2, or overall it should be
edges = [centers-width/2, centers(end)+binWidth/2];

Más 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