Re: Taking the Log causing Mathematica kernel crash.
- To: mathgroup at smc.vnet.net
- Subject: [mg57055] Re: [mg57051] Taking the Log causing Mathematica kernel crash.
- From: zhengji.li at t3gt.com
- Date: Fri, 13 May 2005 01:18:49 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
You may have made some mistakes. Maybe you mean this(it works well):
Clear["Global`*"]
f[t_] := Sin[3.5 t] + 2 Cos[2 t];
g[t_] := Piecewise[{{0, t < -2Pi}, {f[t], t >= -2Pi && t <= 2Pi},
{0, t > 2Pi}}];
c[w_] = Integrate[g[t] Exp[-I w t], {t, -Infinity, Infinity}]; (* Fourier
Transform*)
Plot[20 Log[10, Abs[c[w]]], {w, -5, 5}, PlotRange -> All]
1. The definition of g[t] is wrong.
2. c[w_] = ... but not c[w_] := ...
"me"
<nma at 12000.org> To: mathgroup at smc.vnet.net
cc:
05, 13, 2005 Subject: [mg57055] [mg57051] Taking the Log causing Mathematica kernel crash.
10:44 AM
Please respond to
"me"
Mathematica 5.1 on Windows.
Clear["Global`*"]
f[t_] := Sin[3.5 t] + 2 Cos[2 t];
g[t_] := Piecewise[{{0, t < -2Pi}, { f[t], t = -2Pi && t = 2Pi}, {0, t >
2Pi}}];
c[w_] := Integrate[ g[t] Exp[-I w t], {t, -Infinity, Infinity}] ;
Plot[20 Log[10, Abs[c[w]]], {w, -5, 5}, PlotRange -> All]
The above code causes Mathemtica kernel crash.
Change the last line above to remove the Log, then it is OK:
Plot[20 Abs[c[w]], {w, -5, 5}, PlotRange -> All]
Nasser