DropNonNumeric• DropNonNumeric[list] drops non-numeric elements from list. • DropNonNumeric will drop all rows that contain non-numeric data. • Example: DropNonNumeric[{{1, 2}, {2, m}, {3, 4}}] . • To drop a nonnumeric column from a matrix, first use Transpose[matrix] to convert the columns into rows. • See also: ColumnDrop, Drop, Transpose.
Examples Using InstantCalculatorsHere is the InstantCalculator for the DropNonNumeric function. Enter the parameters for your calculation and click Calculate to see the result.
Out[1]= |  |
Entering Commands DirectlyYou can paste a template for this command via the Text Input button on the DropNonNumeric Function Controller. This defines a 4 4 matrix called data1.
Out[2]= |  |
DropNonNumeric removes the two non-numeric rows of data1.
Out[3]= |  |
This defines a 6 3 matrix called data2.
Out[4]= |  |
Each row has nonnumeric elements, so DropNonNumeric returns an empty list.
Out[5]= |  |
DropNonNumeric leaves the numeric row of the transposed data2 matrix.
Out[6]= |  |
Clear the variable definitions.
|