MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Can you help me rewrite my matlab code to mathematica code?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90703] Re: Can you help me rewrite my matlab code to mathematica code?
  • From: Steven Siew <stevensiew2 at gmail.com>
  • Date: Sun, 20 Jul 2008 06:33:00 -0400 (EDT)
  • References: <g5s9t5$54e$1@smc.vnet.net>

Try this:


n=I * (x Cos[theta]+y Sin[theta])

m=(4*Cos[theta]^2+9*Sin[theta]^2)/4 + I*z

ik=3/(2*Pi)*
    Sin[theta]^2*(1/(2*m)+
        Sqrt[Pi]/4*n/(m)^(3/2)*Exp[n^2/4/m]*(1+Erf[n/(2*Sqrt[m])]))

fik[x_,y_,z_]=FullSimplify[ik]

absintIK[x_,y_,z_]:=Abs@NIntegrate[Evaluate[fik[x,y,z]],{theta,0,2
Pi}]

absintIK[0,0,0]

absintIK[4,5,6]


  • Prev by Date: Re: ListPlot, Inverse plotting
  • Next by Date: Re: Spreadsheet like input
  • Previous by thread: Can you help me rewrite my matlab code to mathematica code?
  • Next by thread: Re: Can you help me rewrite my matlab code to mathematica code?