# Output .csv file not created

**URL:** <https://community.freefem.org/t/output-csv-file-not-created/2931>\
**Category:** General Discussion\
**Created:** [February 4, 2024, 2:09pm UTC](https://community.freefem.org/t/output-csv-file-not-created/2931 "2024-02-04T14:09:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amitkaush](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/amitkaush/32/1978_2.png) [@Amitkaush](https://community.freefem.org/u/Amitkaush)\
**Post date:** [February 4, 2024, 2:09pm UTC](https://community.freefem.org/t/output-csv-file-not-created/2931/1 "2024-02-04T14:09:27Z")

</div>

[i2d.edp](https://community.freefem.org/uploads/short-url/dGlR837sT6bRkw5GHSxDQkzcNot.edp) (2.7 KB)  
While executing the file output files A1.csv and B1.csv are not created.  
load “medit”  
load “msh3”

int df=1;  
int n=10;  
border interval(t=0., df){x=t;y=0;z=0;};  
meshL Th= buildmeshL(interval(n));

fespace Vh(Th,P2);  
plot(Th,wait=1);

real Mj=0.9; // mach number

complex I = 1i;  
real ga=1.4; //gamma  
real M2=(1/(ga_Mj_Mj));  
real Re;  
cout\<\<“Enter Reynold’s number”\<\<endl;  
cin\>\>Re;  
real om,alp,bet;  
// defining the type of stability problem

int a,b;  
cout\<\<“Enter 1 for spatial stability and 2 for temporal stability\n”\<\<endl;  
cin\>\> a;

if(a==1)  
{  
cout\<\<“Enter wave frequency\n”\<\<endl;  
cin\>\>om;}  
else{  
cout\<\<“Enter streamwise wave number\n”\<\<endl;  
cin\>\>alp;  
cout\<\<“Enter spanwise wave number\n”\<\<endl;  
cin\>\>bet;}

fespace Mh(Th,P1);  
fespace Gh(Th,[P2,P2,P2,P1]);  
Vh W,u,v,w,a2,a3,Wy,a1;  
Mh p,a4;

W=2\*y-1;

Wy=2;  
plot(W,wait=1);  
real lambda=(10^18);  
matrixA1;  
matrix B1;

```
              varf A(u,v,w,p,a1,a2,a3,a4)=int1d(Th)(a1*(I*bet*W+(alp^2+bet^2)/(Re))*u-(1/Re)*dy(a1)*dy(u)+a1*p*I*alp+
                                                         a2*(I*bet*W+(alp^2+bet^2)/(Re))*v-(1/Re)*dy(a2)*dy(v)-p*dy(a2)+
                                                         a3*v*Wy+a3*(I*bet*W+(alp^2+bet^2)/(Re))*w-(1/Re)*dy(a3)*dy(w)+a3*I*bet*w+
                                                         a4*u*I*alp+a4*dy(v)+a4*bet*I*w
                                                         
                                                     )+on(1,11,u=0,v=0,w=0);
                                                         
                                                         
              varf B(u,v,w,p,a1,a2,a3,a4)=int1d(Th)(a1*I*u+a2*I*v+a3*I*w); 
              
              
              
                A1=A(Gh,Gh);
               B1=B(Gh,Gh);
              ofstream file("A1.csv");

```

for (int i = 0; i \< A1.m; i++) {  
for (int j = 0; j \< A1.n; j++) {  
if(imag(A1(i,j))\>0){file\<\<real(A1(i,j))\<\<“+”\<\<imag(A1(i,j))\<\<“i”;}  
else{file\<\<real(A1(i,j))\<\<imag(A1(i,j))\<\<“i”;}  
if (j \< A1.m - 1) {  
file\<\< “,”;  
}  
}  
file \<\< endl;  
}

```
       ofstream file1("B1.csv");

```

for (int i = 0; i \< B1.n; ++i) {  
for (int j = 0; j \< B1.m; ++j) {  
if(imag(B1(i,j))\>0){file1\<\<real(B1(i,j))\<\<“+”\<\<imag(B1(i,j))\<\<“i”;}  
else{file1\<\<real(B1(i,j))\<\<imag(B1(i,j))\<\<“i”;}  
if (j \< B1.m - 1) {  
file1\<\< “,”;  
}  
}  
file1\<\< endl;  
}  
cout\<\<A1.m\<\<endl;  
cout\<\<A1.n\<\<endl;

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [February 5, 2024, 9:21am UTC](https://community.freefem.org/t/output-csv-file-not-created/2931/2 "2024-02-05T09:21:03Z")

</div>

I ran it with “1” input for all prompts.  
[upload.zip](https://community.freefem.org/uploads/short-url/sJ9jUeuChSeXrqU2eLVqgQPjE7A.zip) (2.0 KB)
