[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running m-files generated by Petsc 3.4.3
From: |
Andreas Weber |
Subject: |
Re: Running m-files generated by Petsc 3.4.3 |
Date: |
Sat, 25 Jan 2014 10:14:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 |
Am 24.01.2014 14:46, schrieb Torquil Macdonald Sørensen:
> My Petsc 3.4.3-based program outputs a Matlab-file that defines some
> sparse matrices in CSC format. They run fine in Matlab R2013b, but not
> in Octave 3.4.3. The error output I'm getting when running the m-file in
> Octave is:
>
> error: spconvert: argument must be sparse or real matrix with 3 or 4 columns
> error: called from:
> error: /usr/share/octave/3.4.3/m/sparse/spconvert.m at line 37, column 7
> error: /tmp/build/output.m at line 99, column 4
Hi Toquil,
a workaround is to do in line 99
z_tmp=[zzz(:,1:2),real(zzz(:,3)),imag(zzz(:,3))];
A = spconvert(z_tmp);
Because, as I read the help for spconvert, it expects 3 or 4 columns
where colum 3 and 4 are real and imaginary part.
-- Andy