On Thu, Apr 19, 2012 at 06:25, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:
> That means there 1693033 in iReal array that are viewed as real numbers by > matlab and can't use further as indices: > > ??? Subscript indices must either be real positive integers or logicals. > > Error in ==> PetscBinaryRead at 92 > A = complex(reshape(s(iReal),n,m)'**,reshape(s(iImag),n,m)') ; > > Simple workaround that worked for me was just use floor function. > Does replacing linspace with (1:2:2*m*n-1) work without floor? There isn't a guarantee that whatever rounding error committed by linspace always rounds away from zero (so that floor sends it in the right direction). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120419/cdbd3b18/attachment.htm>
