<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>Are the binary format of petsc and matlab the same? When I run the vec ex6, petsc outputs (using PetscBinaryWrite) a binary file "input.dat" with values </div>
<div><div>0</div><div>10</div><div>20</div><div>30</div><div>40</div><div>50</div><div>60</div><div>70</div><div>80</div><div>90</div></div><div><br></div><div>However, when I read this binary from matlab (use fopen and fread), I got all values zeros. What might be wrong here?</div>
<div><br></div><div>Do I have to use petsc functions other than PetscBinaryWrite in order to produce binary files which can be read into matlab? </div><div><br></div><div>Thank you.</div><div><br></div><div>Xiangdong</div>
<div><br></div><div><br></div><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/vec/vec/examples/tutorials/ex6.c.html">http://www.mcs.anl.gov/petsc/petsc-current/src/vec/vec/examples/tutorials/ex6.c.html</a><br></div>