<div dir="ltr">Hello PETSc users, <div><br></div><div>I have a sparse matrix built and I want to output the matrix for viewing in matlab. However i'm having difficulty outputting the matrix. I am writing my program in Fortran90 and I've included the following lines to output the matrix.</div><div><br></div><div> <i><b>call PetscViewerBinaryOpen(PETSC_COMM_SELF,'matrix',FILE_MODE_WRITE,view,ierr)<br> call PetscViewerBinaryGetDescriptor(view,fd,ierr)<br> call PetscBinaryWrite(fd,ham,1,PETSC_SCALAR,PETSC_FALSE,ierr)</b></i><br></div><div><br></div><div>These lines do create a matrix but matlab says its not a binary file. Could you please provide me some inputs on where I'm going wrong and how to proceed with this problem. I can provide any further information that you might need to help me solve this problem. </div><div><br></div><div><br></div><div>Thank you.</div><div><br></div><div>Sincerely,</div><div>Pranay. </div></div>