Skip to main content
deleted 14 characters in body
Source Link
Dr. belisarius
  • 116.8k
  • 13
  • 208
  • 466

The second line below produces the errors shown:

p = LogLogPlot[Abs[10^2/((I \[Omega]ω)^2 + 100)], {\[Omega]ω, 10^0, 10^5}]; p /. x_ /; And @@ NumericQ /@ x :> x[[0]]; Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> 

I have run out of ideas for pinpointing the specific reason for the error (let alone fixing the rule to avoid it).

Is there some command or tool or systematic way to debugging such errors?

The second line below produces the errors shown:

p = LogLogPlot[Abs[10^2/((I \[Omega])^2 + 100)], {\[Omega], 10^0, 10^5}]; p /. x_ /; And @@ NumericQ /@ x :> x[[0]]; Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> 

I have run out of ideas for pinpointing the specific reason for the error (let alone fixing the rule to avoid it).

Is there some command or tool or systematic way to debugging such errors?

The second line below produces the errors shown:

p = LogLogPlot[Abs[10^2/((I ω)^2 + 100)], {ω, 10^0, 10^5}]; p /. x_ /; And @@ NumericQ /@ x :> x[[0]]; Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> 

I have run out of ideas for pinpointing the specific reason for the error (let alone fixing the rule to avoid it).

Is there some command or tool or systematic way to debugging such errors?

Source Link
kjo
  • 11.9k
  • 1
  • 35
  • 92

How to debug error triggered by replacement rule?

The second line below produces the errors shown:

p = LogLogPlot[Abs[10^2/((I \[Omega])^2 + 100)], {\[Omega], 10^0, 10^5}]; p /. x_ /; And @@ NumericQ /@ x :> x[[0]]; Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> Part::pspec: Part specification True is neither a machine-sized integer nor a list of machine-sized integers. >> 

I have run out of ideas for pinpointing the specific reason for the error (let alone fixing the rule to avoid it).

Is there some command or tool or systematic way to debugging such errors?