how to load a matlab matrix?

Barry Smith bsmith at mcs.anl.gov
Fri Sep 26 10:26:22 CDT 2008


On Sep 26, 2008, at 10:19 AM, zhifeng sheng wrote:

> Dear all
>
> I know that Petsc can print a matrix in matlab format. can it read a  
> matlab format matrix? (in the same format, it prints?)
>

    No, if you want to read/write for Matlab you should use the binary  
format. The Matlab programs
in bin/matlab/PetscBinaryRead/Write.m are for use in Matlab.

    Reason: the ASCII format for reading/writing is VERY slow for  
larger matrices. The binary format is fast.


    Barry

> I check Matload, and it does not work.
>
> Thanks a lot
> best regards
> Zhifeng
>




More information about the petsc-users mailing list