From: beda meda on
Hi!

I need to create histogram from these data: matrix with 100 rows and 2 columns. In the first column there are values -100:99, in the second column there are frequency of these values. I need histogram with -100:99 on x axis and frequency in bins.

Example of matrix:
index 1st_column 2_column
1 -100 0
2 -99 3
3 -98 7
ect.

Thanks for anything.
From: Walter Roberson on
beda meda wrote:
> Hi!
>
> I need to create histogram from these data: matrix with 100 rows and 2
> columns. In the first column there are values -100:99, in the second
> column there are frequency of these values. I need histogram with
> -100:99 on x axis and frequency in bins.
>
> Example of matrix:
> index 1st_column 2_column
> 1 -100 0
> 2 -99 3
> 3 -98 7
> ect.

If the second column is the "frequency", that _sounds_ like you mean that the
second column is already the count. If so, then you do not need to take a
histogram.

On the other hand, "frequency" could refer to HZ, and the first column might
refer to coefficients of an FFT, so you might be wanting (perhaps) to ifft()
and then histogram something about the results ??

If the second column is already the count you want displayed, then all you
should need to do is use bar() to create a bar graph.
From: beda meda on
Damn! I totaly forgot about 'bar'... Thanks a lot!

Walter Roberson <roberson(a)hushmail.com> wrote in message <hotal3$3i9$1(a)canopus.cc.umanitoba.ca>...
> beda meda wrote:
> > Hi!
> >
> > I need to create histogram from these data: matrix with 100 rows and 2
> > columns. In the first column there are values -100:99, in the second
> > column there are frequency of these values. I need histogram with
> > -100:99 on x axis and frequency in bins.
> >
> > Example of matrix:
> > index 1st_column 2_column
> > 1 -100 0
> > 2 -99 3
> > 3 -98 7
> > ect.
>
> If the second column is the "frequency", that _sounds_ like you mean that the
> second column is already the count. If so, then you do not need to take a
> histogram.
>
> On the other hand, "frequency" could refer to HZ, and the first column might
> refer to coefficients of an FFT, so you might be wanting (perhaps) to ifft()
> and then histogram something about the results ??
>
> If the second column is already the count you want displayed, then all you
> should need to do is use bar() to create a bar graph.