1
votes

I want to plot unequal width histograms.

x = [10 12 15 18] #bin edges
y = [3 2 6] #corresponding frequences
bar(e, c, 'histc')

I get the following output:

warning: implicit conversion from matrix to string
error: set: unknown property "

"
error: called from:
error: /usr/share/octave/3.2.3/m/plot/bars.m at line 120, column 7
error: /usr/share/octave/3.2.3/m/plot/bar.m at line 161, column 7
error: /usr/share/octave/3.2.3/m/plot/bar.m at line 67, column 19

It seems that histc isn't working.
I have octave 3.2 installed.
Any ideas?

1

1 Answers

0
votes

Use

help bar

to get information about the parameters. You will see that 'histc' is not a valid style option (this is only supported in Matlab).

If you need to count the frequencies of your data the histc function can do this.