[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

NTVDM CPU has encountered an illegal instruction

Asked by ravikumarch in MS DOS, C++ Programming Language, Windows XP Operating System

Tags: C++, WINDOWS XP

I have written a code which contains 4 dimensional array.After compling it shows zero errors.
but when i run it shows the following error:
NTVDM CPU has encountered an illegal instruction...

I referred to this solution..
http://support.microsoft.com/kb/245184

got any better ideas as i do not have  Windows NT Workstation 4.0 or Windows NT Server 4.0,
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<float.h>
#include<math.h>
#include<iomanip.h>
 
 
 
/*printcomplexnumber(double real,double imag)
{
   if (real==0)
   cout<<imag<<"i";
 
   if (imag<0)
   cout<<real<<imag<<"i";
 
   if (imag > 0)
   cout<<real<< "+"<<imag<<"i";
 
    if (imag==0)
   cout<<real;
 
  return(real,imag); }  */
int main()
{ double Ex[9][9][9][9],Ey[9][9][9][9],Ez[9][9][9][9];
  double Hy[9][9][9][9],Hx[9][9][9][9],Hz[9][9][9][9];
  int i,j,k,n,imax,jmax,kmax,nmax;
  float A,ep[10][10][10],eo,muo;
  float dt,c,w,t,lamda;
   cout<<"enter the limits for space and time\n";
 cin>>imax;
 cin>>jmax;
 cin>>kmax;
 cin>>nmax;
/*to assign the dielectric constant*/
 
for(i=0;i<=imax;i++)
{for(j=0;j<=jmax;j++)
{for(k=0;k<=kmax;k++)
{if((i<=imax/2)&&(j<=jmax/2)&&(j<=jmax/2))
ep[i][j][k]=1;
else
ep[i][j][k]=12;
}/*kloop*/
}/*j loop*/
 
}/*i loop
 /* to check the dielectric constant of space*/
 cout<<"enter the value of x,y,z\n";
 cin>>i;
 cin>>j;
 cin>>k;
 
 cout<<"the dielectric constant at this point is ="<<ep[i][j][k]<<endl;
 
 
 /*to clear the memor/
for(n=0;n<=nmax;n=n++)
{
for(i=0;i<=imax;i++)
{for(j=0;j<=jmax;j++)
{for(k=0;k<=kmax;k++)
{Ex[i][j][k][n]=0;
Ey[i][j][k][n]=0;
Ez[i][j][k][n]=0;
Hx[i][j][k][n]=0;
Hy[i][j][k][n]=0;
Hz[i][j][k][n]=0;
}/*k loop/
}/*j loop /
}/*i loop /
}/* t loop/
 
 
   /* launching incident plane wave propagating in x dir*/
  cout<<"\n enter the A and lamda(in micron)";
  cin>>A;
cin>>lamda;
c=3e8;
w=(2*3.14*c)/lamda;
dt=1e-15;
cout<<"i	j	k	n	field	value"<<endl;
for(n=1;n<=2;n++)
{for(i=0;i<=imax;i++)
{for(j=0;j<=jmax;j++)
{for(k=0;k<=kmax;k++)
{t=n*dt;
Ex[i][j][k][n]=A*sin(w*t);
Ey[i][j][k][n]=A*sin(w*t);
Ez[i][j][k][n]=A*sin(w*t);
Hx[i][j][k][n]=A*sin(w*t);
Hy[i][j][k][n]=A*sin(w*t);
Hz[i][j][k][n]=A*sin(w*t);
 
cout<<i<<"\t"<<j<<"\t"<<k<<"\t"<<n<<"\t"<<"Hz"<<"\t"<<Hz[i][j][k][n]<<endl;
cout<<i<<"\t"<<j<<"\t"<<k<<"\t"<<n<<"\t"<<"Hx"<<"\t"<<Hx[i][j][k][n]<<endl;
cout<<i<<"\t"<<j<<"\t"<<k<<"\t"<<n<<"\t"<<"Hy"<<"\t"<<Hy[i][j][k][n]<<endl;
cout<<i<<"\t"<<j<<"\t"<<k<<"\t"<<n<<"\t"<<"Ez"<<"\t"<<Ez[i][j][k][n]<<endl;
cout<<i<<"\t"<<j<<"\t"<<k<<"\t"<<n<<"\t"<<"Ey"<<"\t"<<Ey[i][j][k][n]<<endl;
cout<<i<<"\t"<<j<<"\t"<<k<<"\t"<<n<<"\t"<<"Ez"<<"\t"<<Ex[i][j][k][n]<<endl;
}/* k loop*/
}/* j loop*/
}/* i loop*/
}/*t loop*/
 
eo=8.85e-12;
muo=12.56e-7;
 
 /*boundary condition*/
 
 /*implememnting the FDTD ie.,leap frog method*/
for(n=2;n<=nmax-1;n++)
{for(i=2;i<=imax-2;i++)
{for(j=2;j<=jmax-2;j++)
{for(k=2;k<=kmax-2;k++)
{Hx[i][j][k][n+1]=Hx[i][j][k][n-1]+(1/muo)*(Ey[i][j][k+1][n]-Ey[i][j][k][n])-(1/muo)*(Ez[i][j+1][k][n]-Ez[i][j][k][n]);
 Hy[i][j][k][n+1]=Hx[i][j][k][n-1]+(1/muo)*(Ez[i+1][j][k][n]-Ez[i][j][k][n])-(1/muo)*(Ex[i][j][k+1][n]-Ex[i][j][k][n]);
 Hx[i][j][k][n+1]=Hx[i][j][k][n-1]+(1/muo)*(Ex[i][j+1][k][n]-Ex[i][j][k][n])-(1/muo)*(Ey[i+1][j][k][n]-Ey[i][j][k][n]);
 Ex[i][j][k][n+1]=Ex[i][j][k][n-1]+(1/eo)*(Hz[i][j][k][n]-Hz[i][j-1][k][n])-(1/eo)*(Hy[i][j][k][n]-Hy[i][j][k-1][n]);
 Ey[i][j][k][n+1]=Ex[i][j][k][n-1]+(1/eo)*(Hx[i][j][k][n]-Hx[i][j][k-1][n])-(1/eo)*(Hz[i][j][k][n]-Hz[i-1][j][k][n]);
 Ez[i][j][k][n+1]=Ex[i][j][k][n-1]+(1/eo)*(Hy[i][j][k][n]-Hy[i-1][j][k][n])-(1/eo)*(Hx[i][j][k][n]-Hx[i][j-1][k][n]);
 cout<<Ez[i][j][k][n+1];		}/* k loop*/
		 }/*j loop*/
		   } /*i loop*/
		   }/*t loop*/
 
 
return 0; }/*main end*/
Attachments:
 
error message
error message
 
[+][-]10/12/09 09:36 AM, ID: 25552668Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: MS DOS, C++ Programming Language, Windows XP Operating System
Tags: C++, WINDOWS XP
Sign Up Now!
Solution Provided By: jkr
Participating Experts: 3
Solution Grade: A
 
[+][-]10/12/09 08:41 AM, ID: 25552173Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/12/09 08:47 AM, ID: 25552227Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/13/09 01:20 AM, ID: 25557889Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10/13/09 01:33 AM, ID: 25557942Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/13/09 01:43 AM, ID: 25557987Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625