Dear All,

I met a problem about using "load()" function in Matlab to read a m file which 
describes a PETSc Mat object by :
 //Save coeff_matrix as a matlab file PetscViewer viewer; 
PetscViewerASCIIOpen(PETSC_COMM_WORLD,"CoeffMatrixFileName.m",&viewer); 
PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_MATLAB); MatView(coeff_matrix, 
viewer); PetscViewerDestroy(&viewer);
In Matlab, I used:M=load("CoeffMatrixFileName.m") and I got an error.The error 
is:???Error using ===> loadNumber of columns on line 2 of ASCII file 
CoeffMatrixFileName.m must be the same as previous lines.
Do you know how to deal with that error?Or Do you think there is some a mistake 
in my output of PETSc Mat Obj with the PetscViewer? 
Thank you~:)
Meng

Reply via email to