Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Electric Field' topicStudent Support Forum > General > Archives > "Electric Field"

Next Comment >Help | Reply To Topic
Author Comment/Response
Sean Roubion
07/07/13 7:42pm

I have a loop for the electric field:

For[i=iini+1,i<=ilast-1,i++,
   For[j=jini+1,j<=jlast-1,j++,
      Ex[i,j]=-(V[i+1,j]-V[i-1,j])/(2*Deltax);
      Ey[i,j]=-(V[i,j+1]-V[i,j-1])/(2*Deltax);
      ];
   ];

How can I put this boundary condition V[i,j] = {0,0,0,0,0,0,0,
0,0,0,0,0,0,0,
0,0,1,1,1,0,0,
0,0,1,1,1,0,0,
0,0,1,1,1,0,0,
0,0,0,0,0,0,0,
0,0,0,0,0,0,0}

into the loop to calculate the electric field?


URL: ,

Subject (listing for 'Electric Field')
Author Date Posted
Electric Field Sean Roubion 07/07/13 7:42pm
Re: Electric Field Peter Pein 07/08/13 03:57am
Re: Re: Electric Field Sean Roubion 07/08/13 9:00pm
Next Comment >Help | Reply To Topic