필터 지우기
필터 지우기

Index exceeds matrix dimensions for x and y label

조회 수: 5 (최근 30일)
Christina Williams
Christina Williams 2019년 3월 3일
답변: Walter Roberson 2019년 3월 4일
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');

답변 (1개)

Walter Roberson
Walter Roberson 2019년 3월 4일
At some point you accidentally assigned a value to a variable named xlabel or ylabel

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by