Borrar filtros
Borrar filtros

Index exceeds matrix dimensions for x and y label

5 visualizaciones (últimos 30 días)
Christina Williams
Christina Williams el 3 de Mzo. de 2019
Respondida: Walter Roberson el 4 de Mzo. de 2019
I'm trying to make a 25 bin histogram of a 50000 random number array and it won't let me add x and y labels saying that the index exceeds the matrix dimensions.
x=rand(50000,1); % x is the vector with 50000 random numbers
figure
hist(x,25) %creates histagram with 25 bins
title('25 Bin Histogram');
xlabel('N');
ylabel('H');

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Mzo. de 2019
At some point you accidentally assigned a value to a variable named xlabel or ylabel

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by