From: ImageAnalyst on
On Aug 8, 9:47 pm, "ravi " <ravi_...(a)hotmail.com> wrote:
> Is there a keyword similar to "all" that i can use for testing individual numbers? If not ,please give me a hint on how I can do it.
>
> thanks for the help
> ravi
------------------------------------------------------------------------------------------------------------------
ravi:
A companion function to all() is any() - not sure if that will do what
you want.
Or you can just test individual elements, like zz(1) > hh(1,1).
ImageAnalyst
From: ravi on
thnks
From: Jan Simon on
Dear Ravi,

> But I keep getting the error "??? Operands to the || and && operators must be convertible to logical scalar values".
> if (zz>hh(1,:)) && (zz<hh(2,:))

As the error message claims, || and && operate on logical scalars. In opposite to that, | and & operate on arrays, and they are equivalent to the AND and OR functions.

Kind regards, Jan