From: Rahul Singhal on
Hi All,

I want to check whether any element of matrix is zero or not.

Thanks
Rahul
From: Oleg Komarov on
"Rahul Singhal" <rsinghalomatic(a)gmail.com> wrote in message <hsgbb3$ik7$1(a)fred.mathworks.com>...
> Hi All,
>
> I want to check whether any element of matrix is zero or not.
>
> Thanks
> Rahul

help all

Example:

A = round(rand(10));
~all(A(:))

Oleg
From: us on
"Rahul Singhal" <rsinghalomatic(a)gmail.com> wrote in message <hsgbb3$ik7$1(a)fred.mathworks.com>...
> Hi All,
>
> I want to check whether any element of matrix is zero or not.
>
> Thanks
> Rahul

a hint:
- besides ANY already mentioned by oleg...

help nnz;

us