Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Explain me some C++ statements

Status
Not open for further replies.

fatma1000

Banned
Full Member level 2
Joined
Apr 30, 2006
Messages
147
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
eygpt
Activity points
0
please explain this steatments step by step

void pren(name,EX,t,fpfix)
{
int t;
char *name,*fpfx[];
float ex[zmax];
FILE *fptr
char string[20];
int i;
double *emat;
emat=(double*)malloc(zmax/2*sizof(double))
for(i=0;i<zmax/2;i++)

emat=(double)ex[2*i];
sprintf(string,"%s%d"%s",fpfix[1],t,".mat")'
fptr=fopen(string,"wb");
savemat(fptr,1000,name,zmax/2,1,0,emat,(double*)0);
dclose(fptr)free(emat);
}
 

Re: help7 c++

void pren(name,EX,t,fpfix) -> wrong definition
{
int t;
char *name,*fpfx[];
float ex[zmax];
FILE *fptr
char string[20];
int i;
double *emat;
emat=(double*)malloc(zmax/2*sizof(double)) -> Why copy from ex to
for(i=0;i<zmax/2;i++)

emat=(double)ex[2*i]; -> ex is not initialized. Did you mean to use EX instead? or to call function exp(2*i)
sprintf(string,"%s%d"%s",fpfix[1],t,".mat")'
fptr=fopen(string,"wb");
savemat(fptr,1000,name,zmax/2,1,0,emat,(double*)0); -> savematr is doing what?
dclose(fptr)free(emat);
}

Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top