From: kamal on
i have a matrix of doubles, and would like to find the statistics of each number or in other words, to find how many times each element has been repeated across the matrix and plot it. i have a solution with for loops but it's too slow. i am looking for a matlab solution that is not based on nested for loops.
From: Ross W on
"kamal " <kamal.shaterian+mathworks(a)gmail.com> wrote in message <i3gbas$90g$1(a)fred.mathworks.com>...
> i have a matrix of doubles, and would like to find the statistics of each number or in other words, to find how many times each element has been repeated across the matrix and plot it. i have a solution with for loops but it's too slow. i am looking for a matlab solution that is not based on nested for loops.

Hi

I suggest you start by trying the hist function.

Ross
From: kamal on
"Ross W" <rosswoodskiwi(a)hotmail.com> wrote in message <i3gece$ll0$1(a)fred.mathworks.com>...
> "kamal " <kamal.shaterian+mathworks(a)gmail.com> wrote in message <i3gbas$90g$1(a)fred.mathworks.com>...
> > i have a matrix of doubles, and would like to find the statistics of each number or in other words, to find how many times each element has been repeated across the matrix and plot it. i have a solution with for loops but it's too slow. i am looking for a matlab solution that is not based on nested for loops.
>
> Hi
>
> I suggest you start by trying the hist function.
>
> Ross

thanks Ross, it is not as exact as i wanted but solved my problem.
From: Ross W on
"kamal " <kamal.shaterian+mathworks(a)gmail.com> wrote in message <i3ofjm$h71$1(a)fred.mathworks.com>...
> "Ross W" <rosswoodskiwi(a)hotmail.com> wrote in message <i3gece$ll0$1(a)fred.mathworks.com>...
> > "kamal " <kamal.shaterian+mathworks(a)gmail.com> wrote in message <i3gbas$90g$1(a)fred.mathworks.com>...
> > > i have a matrix of doubles, and would like to find the statistics of each number or in other words, to find how many times each element has been repeated across the matrix and plot it. i have a solution with for loops but it's too slow. i am looking for a matlab solution that is not based on nested for loops.
> >
> > Hi
> >
> > I suggest you start by trying the hist function.
> >
> > Ross
>
> thanks Ross, it is not as exact as i wanted but solved my problem.

how about unique?