Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Numerical Functions > Unitize >

Unitize

Unitize[x]
gives when x is zero, and when x has any other numerical value.
  • Unitize gives for any x with magnitude less than dx.
  • Unitize[x] in general works using PossibleZeroQ, and can handle numbers represented in symbolic form.
Convert numerical values to zero or one:
Replace values in a matrix with zeros or ones:
Show a plot that emphasizes structure:
Convert numerical values to zero or one:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Replace values in a matrix with zeros or ones:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Show a plot that emphasizes structure:
In[3]:=
Click for copyable input
Out[3]=
Determine if a sparse matrix is structurally symmetric:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF