output to matlab

Yixun Liu enjoywm at cs.wm.edu
Mon Feb 16 19:05:26 CST 2009


Hi,
I want to output matrix and vector into matlab.
// output a vector,
      PetscViewer bviewer;
      PetscViewerCreate(PETSC_COMM_WORLD, &bviewer);
      PetscViewerSetType(bviewer, PETSC_VIEWER_ASCII);
      PetscViewerSetFormat(bviewer, PETSC_VIEWER_ASCII_MATLAB);
      PetscViewerFileSetName(bviewer, bname);
      VecView(externalForcesVector, bviewer);//externalForcesVector is a
parallel vector.

However, the output file contains nothing.

Thanks.

Yixun




More information about the petsc-users mailing list