[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: petsc to matlab
billy@dem.uminho.pt writes:
What goes wrong?
Matt
> How can I save the matrix in PETSc and load it in matlab?
>
> I tried this but it does not work:
>
>
> PetscViewer view;
>
> PetscViewerCreate (PETSC_COMM_WORLD, &view);
>
> PetscViewerSetFormat (view, PETSC_VIEWER_ASCII_MATLAB);
>
> PetscViewerAsciiOpen(PETSC_COMM_WORLD, "matrix.mat", &view);
>
> MatView(A, view);
>
> PetscViewerDestroy(view);
>
>
>
> Billy.
>
>
>
--
"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness