something like dB
- To: mathgroup at smc.vnet.net
- Subject: [mg56516] something like dB
- From: Zhengji Li <zhengji.li at gmail.com>
- Date: Thu, 28 Apr 2005 02:40:02 -0400 (EDT)
- Reply-to: Zhengji Li <zhengji.li at gmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mathematica ers,
In engineering, we always like values such as power be represented
in dB form.
I can make dB as a Unit, but things go to strange when 0 dB occurs:
Times[0, dB] will give 0 no matter dB is ReadProtected or not.
I have tried to define a upvalue for dB:
dB /: Times[0, dB] = 1; but Mathematica do not allow
this cause dB is not a
"function".
I can define a new rule for Times: Times[0, dB] = 1, but this may
slow down the
kernel. Anybody know how ?
Best regards.