how to load a matlab matrix?

zhifeng sheng z.sheng at ewi.tudelft.nl
Fri Sep 26 10:40:16 CDT 2008


Barry Smith wrote:
>
> 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
>>
>
But I am a matlab  script as big as 1.2 G, and matlab can not handle it....

I am hoping by putting it in petsc, I can do something with it.

Any suggestions?

thanks
Zhifeng




More information about the petsc-users mailing list