MathGroup Archive 2008

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

Search the Archive

Re: enquiry

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89217] Re: enquiry
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 29 May 2008 07:06:40 -0400 (EDT)
  • References: <g1j6da$qlu$1@smc.vnet.net>


Hi Bico,

do not use funny names like y*, this only gives you troubles.

To solve your problem, first define a function of m and n that 

calculates the matrix element: fun[m,n]. Then create the matrix. If your 

indices start with 1 you can use Array, e.g.:

Array[fun,{2,3}]

There are other forms of Array for more complicated cases. But in this 

case it may be easier to use Table:

Table[fun[m,n],{m,3,5},{n,2,3}]

hope this helps, Daniel



abubaker alshafee wrote:

> Hi All

>    

>   I am tryin to build a Matrix

>    Vmn =  Array[v, {m, n}]  with V equal to

>   

> V = (-(y*  N[BesselK[13 I, 2 Pi n y*]] 

>         Exp[(13 Pi)/2]] Exp[2 Pi I n (((j - 1/2)/2) 

>          Q)] Exp[-2 Pi I m (((j - 1/2)/2) Q)])) 

>     (1/(2 Q)) + KroneckerDelta[m, n] 

>     (Sqrt[y] N[BesselK[13 I, 2 Pi m y] 

>        Exp[(13 Pi)/2]])

>    

>   I used the following but I faild to get the correct matrix or array,

> I got a reapeted answers , I also need to generate a loop to build the Array of V elements Any one can help with that,

>   here the loops i wrote but it is not working 

>    

>   MY = 10; 

> For[m = 2, m <= MY, m++,

>  Q = 11;

>  b = {};

>  y = 0.3; 

>    y* = 0.3;

>  For[n = 2, n <= MY, n++, 

>     For[j = 1, j <= Q, j = j + 1, 

>         v = (Sqrt[y]*

>          N[BesselK[13 I,2 Pi n y*] 

>          Exp[13 Pi/2)] 

>          Exp[2 Pi I n ((j - 1/2) Q/2)]

>         Exp[2 Pi I m ((j - 1/2) Q/2)]; 

>        v = KroneckerDelta[m, n] (Sqrt[y] 

>          N[BesselK[13 I, 2 Pi m y] 

>            E^((13 Pi)/2), 50]) - 

>        v/(2 Q); 

> AppendTo[b, v];

>  

>     gg = Array[v, {m, n}]]]

> Print[gg]

>    

>    

>    

>    

>   Regards

> Bico





-- 



Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh at metrohm.com>

Internet:<http://www.metrohm.com>




  • Prev by Date: FindRoot with vector domain
  • Next by Date: Re: Plot3D crashes Mathematica 6.02
  • Previous by thread: Re: enquiry
  • Next by thread: Sum simplifying