help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: histc()


From: Jaroslav Hajek
Subject: Re: histc()
Date: Thu, 2 Oct 2008 12:36:55 +0200

2008/10/2 Primoz PETERLIN <address@hidden>:
> Hello everyone,
>
> Recently, I needed to group data into a histogram and noticed that
> Octave doesn't have the histc() function. Even though, according to
> the list archives, there has been some discussion about histc() on
> this list in May 2006, it didn't result in a function that a) would
> work, and b) would work reasonably fast (Aakash Dalwani submitted some
> code that does the job, but is strictly scalar, while Francesco
> Potorti submitted a function that uses vectorization, but is otherwise
> wrong). So I have written my own implementation. For three reasons, it
> doesn't support matrices yet: a) I didn't needed that feature, b) I am
> not sure I understand the MATLAB Function Reference[1] on the web, and
> c) I don't have a working Matlab handy to test what the function
> reference is supposed to mean.
>
> If anybody finds it useful, here it is. Being a rather novice Octave
> user, I would also be happy if somebody would teach me a better way to
> do it. :)
>

Maybe there's a way to speed this up using the lookup function? Lookup
does something similar - instead of bin counts, it returns bin indices
for each value. But right now I don't see any easy way how to
transform that to the desired result.

> All the best,
> Primož
>
> [1] http://www.mathworks.com/access/helpdesk/help/techdoc/ref/histc.html
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]