Thanks a lot, it's ok using the code
PetscViewer viewer;
PetscViewerASCIIOpen(PETSC_COMM_WORLD, K1.m, viewer);
PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_MATLAB);
MatView(data-K1, viewer);
but failed with the code
MatView(data-K1, PETSC_VIEWER_MATLAB_WORLD);
as the
weiwei,
The easist way is run your petsc code with the option
'-mat_view_matlab', and dump it into a file.
Then use Matlab to load it for whatever you want to investigate.
See petsc user manual on Using Matlab with PETSc.
Hong
On Mon, 10 Aug 2009, Weiwei Wang wrote:
Dear All,
I want to
You don't need to install petsc with matlab for this. You can
just use '-mat_view_matlab' - or PETSC_VIEWER_MATLAB in your code.
Satish
On Mon, 10 Aug 2009, Weiwei Wang wrote:
Dear All,
I want to check the determinant of some sparse matrix in petsc but I
didn't know how to do it using
You should really use the PetscViewerBinaryOpen() then use bin/
matlab/PetscBinaryRead() to read the matrices and vectors into
Matlab.
Barry
On Aug 10, 2009, at 10:10 PM, Weiwei Wang wrote:
Thanks a lot, it's ok using the code
PetscViewer viewer;