Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Functions

any

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Returns 1 if any of the specified matrix entries are nonzero and returns 0 otherwise.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

out = any(A);

Will return 1 if any of the A matrix entries are nonzero and will return 0 otherwise.

out = any(A,n);

n is an optional parameter to analyze entries in a specific dimension

 

Example #1

The following is a simple example showing how to use this command.

a = [0,0,3,0];

b = [1,3;6,0.1];

d = [0;0;0;0];

?any(a);

?any(b);

?any(d);

result:

1

result:

1  

result: 

0  

 

?any(a,1);

result: 

0  

0  

1  

 

See Also

all, almostequal

Copyright Lumerical Inc. | Privacy | Site Map