How to apply a diff to histogram object?
2 次查看(过去 30 天)
显示 更早的评论
Hi everybody,
I am trying to apply a difference to an histogram result, which is an object.
H=histogram(matrixvalues,bins);
dH=[0,diff(H)];
but the result is
Undefined function 'diff' for input arguments of type 'matlab.graphics.chart.primitive.Histogram'.
This is because, I think, the H output is an histogram object and not a double.
With the older function hist there are no problems because the output is a double, but with histogram I can not.
Any advices?
Thanks a lot
0 个评论
采纳的回答
Star Strider
2019-5-21
I have no idea what you wwant.
Try this:
dH = diff(H.BinCounts);
To se all the available fields, do this:
histogramFields = get(H)
10 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!