필터 지우기
필터 지우기

program for sin wave histogram with plot command, not with hist command

조회 수: 4 (최근 30일)
mah esi
mah esi 2013년 3월 8일
I want to have histogram of sine wave but not with hist command, can any one help me to have histogram of sine wave with plot command? I've found how to plot a series of data, but I don't know for a sin wave how can i plot it's histogram? the number of bins can be optional.

답변 (2개)

Ruben
Ruben 2013년 3월 8일
You could try doing it with the rectangle command, type
help rectangle
in your command window to find out more.
However I don't see why you can't use the hist command...

Image Analyst
Image Analyst 2013년 3월 8일
I'm not sure what you're asking. Exactly what does "have histogram of sine wave with plot command" mean? Do you mean that you just want to plot it in an axes with the plot() command (like the body of your post seems to indicate)? Or do you want to DETERMINE the histogram some other way than the hist() function (like the subject line of your post seems to indicate)? Why can't you just do
[counts values] = hist(yourSineSignal, numberOfBins);
plot(values, counts);
???

카테고리

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