From: Beskie on


A(logical(isprime(A)==1))
From: Walter Roberson on
Beskie wrote:
>
> A(logical(isprime(A)==1))

Ah, in that case you could shorten the code to

A(isprime(A))

The result of isprime is already 0 and 1's, which is good enough for logical
indexing without needing to compare for 1 (which would produce a logical value
for sure) and without needing the logical() call (which would be redundant on
logical values.)