<div class="gmail_quote">On Thu, Apr 19, 2012 at 06:25, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":1uj">That means there 1693033 in iReal array that are viewed as real numbers by matlab and can't use further as indices:<br>
<br>
??? Subscript indices must either be real positive integers or logicals.<br>
<br>
Error in ==> PetscBinaryRead at 92<br>
A = complex(reshape(s(iReal),n,m)'<u></u>,reshape(s(iImag),n,m)') ;<br>
<br>
Simple workaround that worked for me was just use floor function.</div></blockquote></div><br><div>Does replacing linspace with (1:2:2*m*n-1) work without floor?</div><div><br></div><div>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).</div>