# Chop not working [closed]

I am running a function that has a large output in matrix format with small, complex parts added to the numbers- basically a rounding error. I am trying to use Chop to obtain use-able results, but when I highlight Chop[%] and choose Evaluate Cells from the drop down, the program just beeps and highlights the last original output bracket in neon green. Does anyone have any ideas on this? Thanks much,

Laura

• be aware "Evaluate Cells" evaluates the entire contents of the cell, not just the thing you highlighted. Your error is probably not with the chop. – george2079 Mar 23 '16 at 21:01
• "why the beep" and "why the coloring" in the help menu may be useful – george2079 Mar 23 '16 at 21:07
• "Why the beep" was helpful! The cell was not evaluatable, so all I had to do was change that... thank you – Laura McMullen Mar 23 '16 at 21:23

Here is some fake data with small real components and very small imaginary components.

data =
Table[RandomReal[{10^-19, 10^-17}] +
I RandomReal[{10^-58, 10^-48}], {i, 10}]

(* {6.95652*10^-18 + 1.12565*10^-49 I,
7.07667*10^-18 + 6.35178*10^-49 I, 3.20216*10^-18 + 3.00947*10^-49 I,
5.40598*10^-18 + 7.43668*10^-49 I, 2.06847*10^-18 + 8.6374*10^-50 I,
7.26575*10^-18 + 5.34808*10^-51 I,
1.13101*10^-18 + 6.56817*10^-50 I, 9.26818*10^-18 + 6.55484*10^-49 I,
2.02467*10^-18 + 8.74861*10^-49 I,
7.80163*10^-18 + 7.93328*10^-49 I} *)


Chop takes a second argument that sets numbers that are smaller in magnitude to zero. Chop is also listable.

Chop[data, 10^-20]

(* {6.95652*10^-18, 7.07667*10^-18, 3.20216*10^-18,
5.40598*10^-18, 2.06847*10^-18, 7.26575*10^-18, 1.13101*10^-18,
9.26818*10^-18, 2.02467*10^-18, 7.80163*10^-18} *)