MathGroup Archive 2008

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90684] Can you help me rewrite my matlab code to mathematica code?
  • From: djliu2006 at 163.com
  • Date: Sat, 19 Jul 2008 04:49:42 -0400 (EDT)

Hello all,
Rectntly, i wrote a code using matlab. in the code written by me, i
use a function erf(x), while the x used by me is complex arguments, so
the matlab cannot give the results. i realized that the mathematica can
realize this. I'm a green hand in Mathematica, so I cannot rewrite my
matlab code to Mathematica. the matlab code written by me is attached
in  "http://www.mathworks.com/matlabcentral/newsreader/view_thread/172809";.
is there anyone can help me rewrite the code using Mathematica.

the function i need to plot 3D is the abs(Ik(x,y))


Ik is the integration of ik(theta) from 0 to 2*pi.  and
ik(theta)=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)])]];
M=(4*cos(theta)^2+9.*sin(theta)^2)/4+i*z;
N=i*(x*cos(theta)+y*sin(theta));

z is constant, and we can given z=5; and want to plot the 3D picture
of the absolute value of Ik in the xy plane. The x and y is from 20 to
20.

Thanks,
Dajun Liu


  • Prev by Date: Re: Save as PDF with color
  • Next by Date: Re: Corrupt graphics output
  • Previous by thread: Re: export eps
  • Next by thread: Re: Can you help me rewrite my matlab code to mathematica code?