what I have to do to solve the error "Invalid or deleted object." while creation of histogram?

14 次查看(过去 30 天)
I created a Histogram of the wav file :
[n, fs] = audioread('host.wav');
h = histogram(n);
then histogram has plotted and its porperties were displayed like as follows:
h =
Histogram with properties:
Data: [62747×1 double]
Values: [1×205 double]
NumBins: 205
BinEdges: [1×206 double]
BinWidth: 100
BinLimits: [-9300 11200]
Normalization: 'count'
FaceColor: 'auto'
EdgeColor: [0 0 0]
When i tried to access the poperties of this histogram like
h.NumBins();
it gives an error as given below:
Invalid or deleted object.
Error in matlab.graphics.chart.primitive.Histogram/get.BinEdges
Error in matlab.graphics.chart.primitive.Histogram/get.NumBins
How to resolve this issue? Thanks in Advance
  3 个评论

请先登录,再进行评论。

回答(1 个)

KSSV
KSSV 2019-3-5
Dont close the figure.....if you close the figure obviously you will get this error.
  5 个评论

请先登录,再进行评论。

类别

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