[petsc-users] binary format difference between matlab and pestc
Jed Brown
jed at jedbrown.org
Sat Feb 15 20:02:01 CST 2014
Xiangdong <epscodes at gmail.com> writes:
> Hello everyone,
>
> 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
> 0
> 10
> 20
> 30
> 40
> 50
> 60
> 70
> 80
> 90
>
> However, when I read this binary from matlab (use fopen and fread), I got
> all values zeros. What might be wrong here?
Use PetscBinaryRead() from bin/matlab/ to read PETSc binary format in MATLAB.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140215/a0da3cd3/attachment.pgp>
More information about the petsc-users
mailing list