<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377</link>
    <title>MATLAB Central Newsreader - Strange errors</title>
    <description>Feed for thread: Strange errors</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 26 Oct 2007 14:46:32 -0400</pubDate>
      <title>Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398561</link>
      <author>Matthew Sullivan</author>
      <description>I've been running in to a strange MATLAB script problem that&lt;br&gt;
I don't quite understand.  The specific error I get is&lt;br&gt;
&quot;Subscript indices must either be real positive integers or&lt;br&gt;
logicals.&quot;  The indices I use are real positive integers,&lt;br&gt;
though. When I copy and past the offending commend in to the&lt;br&gt;
MATLAB command line, it executes without issue. &lt;br&gt;
&lt;br&gt;
The most frustrating thing is that the errors are not&lt;br&gt;
repeatable.  If I clear memory and rerun, it sometimes will&lt;br&gt;
work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
script, or at another point in the loop.  I've only recently&lt;br&gt;
run in to this issue, as well.  I can sometimes get the&lt;br&gt;
error running older code that I hadn't run in a long time&lt;br&gt;
and had no problems with when I ran it months ago.&lt;br&gt;
&lt;br&gt;
I assume there's something wrong with my computer or the&lt;br&gt;
script I'm running.  As it appears somewhat randomly I am at&lt;br&gt;
a loss for fixing it.  For completeness, here is my most&lt;br&gt;
recent error message:&lt;br&gt;
&lt;br&gt;
?? Subscript indices must either be real positive integers&lt;br&gt;
or logicals.&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&lt;br&gt;
Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trt = track(xyt', trackdist, params);&lt;br&gt;
&lt;br&gt;
lenxn = trackdist = 25</description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 14:57:58 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398563</link>
      <author>Titus</author>
      <description>&lt;br&gt;
&quot;Matthew Sullivan&quot; &amp;lt;nospam@nospam.no&amp;gt; schrieb im Newsbeitrag &lt;br&gt;
news:ffsuk8$331$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; I've been running in to a strange MATLAB script problem that&lt;br&gt;
&amp;gt; I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt; &quot;Subscript indices must either be real positive integers or&lt;br&gt;
&amp;gt; logicals.&quot;  The indices I use are real positive integers,&lt;br&gt;
&amp;gt; though. When I copy and past the offending commend in to the&lt;br&gt;
&amp;gt; MATLAB command line, it executes without issue.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The most frustrating thing is that the errors are not&lt;br&gt;
&amp;gt; repeatable.  If I clear memory and rerun, it sometimes will&lt;br&gt;
&amp;gt; work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
&amp;gt; script, or at another point in the loop.  I've only recently&lt;br&gt;
&amp;gt; run in to this issue, as well.  I can sometimes get the&lt;br&gt;
&amp;gt; error running older code that I hadn't run in a long time&lt;br&gt;
&amp;gt; and had no problems with when I ran it months ago.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I assume there's something wrong with my computer or the&lt;br&gt;
&amp;gt; script I'm running.  As it appears somewhat randomly I am at&lt;br&gt;
&amp;gt; a loss for fixing it.  For completeness, here is my most&lt;br&gt;
&amp;gt; recent error message:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; ?? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;gt;                ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;gt;            trt = track(xyt', trackdist, params);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; lenxn = trackdist = 25&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
Hi Matthew,&lt;br&gt;
are you sure, that ymat has only integer values? Sometimes it&lt;br&gt;
might happen that they look like integers but they don't. You can&lt;br&gt;
try by computing&lt;br&gt;
ymat2 = ymat - round(ymat);&lt;br&gt;
before line 502 and see, if ymat2 is really zero by&lt;br&gt;
ymatIsInteger = ~any(ymat(:))&lt;br&gt;
&lt;br&gt;
If they should be integers but are not (due to roundoff),&lt;br&gt;
use round(ymat) instead of ymat.&lt;br&gt;
&lt;br&gt;
Titus </description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 15:06:38 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398564</link>
      <author>John D'Errico</author>
      <description>&quot;Matthew Sullivan&quot; &amp;lt;nospam@nospam.no&amp;gt; wrote in message &amp;lt;ffsuk8$331&lt;br&gt;
$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I've been running in to a strange MATLAB script problem that&lt;br&gt;
&amp;gt; I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt; &quot;Subscript indices must either be real positive integers or&lt;br&gt;
&amp;gt; logicals.&quot;  The indices I use are real positive integers,&lt;br&gt;
&amp;gt; though. When I copy and past the offending commend in to the&lt;br&gt;
&amp;gt; MATLAB command line, it executes without issue. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The most frustrating thing is that the errors are not&lt;br&gt;
&amp;gt; repeatable.  If I clear memory and rerun, it sometimes will&lt;br&gt;
&amp;gt; work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
&amp;gt; script, or at another point in the loop.  I've only recently&lt;br&gt;
&amp;gt; run in to this issue, as well.  I can sometimes get the&lt;br&gt;
&amp;gt; error running older code that I hadn't run in a long time&lt;br&gt;
&amp;gt; and had no problems with when I ran it months ago.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I assume there's something wrong with my computer or the&lt;br&gt;
&amp;gt; script I'm running.  As it appears somewhat randomly I am at&lt;br&gt;
&amp;gt; a loss for fixing it.  For completeness, here is my most&lt;br&gt;
&amp;gt; recent error message:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ?? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;gt;                 ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;gt;             trt = track(xyt', trackdist, params);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; lenxn = trackdist = 25&lt;br&gt;
&lt;br&gt;
The problem is not with lenxn and indexing into&lt;br&gt;
ymat.&lt;br&gt;
&lt;br&gt;
The problem is that ymat apparently does not&lt;br&gt;
always contain pure integers. &lt;br&gt;
&lt;br&gt;
So your indexing into y is the problem.&lt;br&gt;
&lt;br&gt;
John</description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 15:39:22 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398568</link>
      <author> ImageAnalyst</author>
      <description>On Oct 26, 10:46 am, &quot;Matthew Sullivan&quot; &amp;lt;nos...@nospam.no&amp;gt; wrote:&lt;br&gt;
&amp;gt; I've been running in to a strange MATLAB script problem that&lt;br&gt;
&amp;gt; I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt; &quot;Subscript indices must either be real positive integers or&lt;br&gt;
&amp;gt; logicals.&quot;  The indices I use are real positive integers,&lt;br&gt;
&amp;gt; though. When I copy and past the offending commend in to the&lt;br&gt;
&amp;gt; MATLAB command line, it executes without issue.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The most frustrating thing is that the errors are not&lt;br&gt;
&amp;gt; repeatable.  If I clear memory and rerun, it sometimes will&lt;br&gt;
&amp;gt; work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
&amp;gt; script, or at another point in the loop.  I've only recently&lt;br&gt;
&amp;gt; run in to this issue, as well.  I can sometimes get the&lt;br&gt;
&amp;gt; error running older code that I hadn't run in a long time&lt;br&gt;
&amp;gt; and had no problems with when I ran it months ago.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I assume there's something wrong with my computer or the&lt;br&gt;
&amp;gt; script I'm running.  As it appears somewhat randomly I am at&lt;br&gt;
&amp;gt; a loss for fixing it.  For completeness, here is my most&lt;br&gt;
&amp;gt; recent error message:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; ?? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;gt;                 ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;gt;             trt = track(xyt', trackdist, params);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; lenxn = trackdist = 25&lt;br&gt;
&lt;br&gt;
============================================================&lt;br&gt;
Put a breakpoint there and check the workspace to see if it calls ymat&lt;br&gt;
an array of integers or doubles.&lt;br&gt;
Also, you can do class(ymat) in the command window at that breakpoint&lt;br&gt;
to see what MATLAB thinks it really is.&lt;br&gt;
It will report back the data type it considers it: some flavor or&lt;br&gt;
floating point, or some flavor of integer.&lt;br&gt;
Good luck,&lt;br&gt;
ImageAnalyst</description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 17:05:01 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398574</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;ffsuk8$331$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Matthew Sullivan &amp;lt;nospam@nospam.no&amp;gt; wrote:&lt;br&gt;
&amp;gt;I've been running in to a strange MATLAB script problem that&lt;br&gt;
&amp;gt;I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt;&quot;Subscript indices must either be real positive integers or&lt;br&gt;
&amp;gt;logicals.&quot;&lt;br&gt;
&lt;br&gt;
You can encounter that problem if you think you are calling&lt;br&gt;
a function, but you have accidently introduced a variable with&lt;br&gt;
the same name as the function so that it is trying to index&lt;br&gt;
the variable with function arguments.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;So you found your solution&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;What will be your last contribution?&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;-- Supertramp (Fool's Overture)</description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 20:10:56 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398593</link>
      <author>Matthew Sullivan</author>
      <description>&amp;nbsp;ImageAnalyst &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;1193413162.578228.104670@o3g2000hsb.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; On Oct 26, 10:46 am, &quot;Matthew Sullivan&quot; &amp;lt;nos...@nospam.no&amp;gt;&lt;br&gt;
wrote:&lt;br&gt;
&amp;gt; &amp;gt; I've been running in to a strange MATLAB script problem that&lt;br&gt;
&amp;gt; &amp;gt; I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt; &amp;gt; &quot;Subscript indices must either be real positive integers or&lt;br&gt;
&amp;gt; &amp;gt; logicals.&quot;  The indices I use are real positive integers,&lt;br&gt;
&amp;gt; &amp;gt; though. When I copy and past the offending commend in to the&lt;br&gt;
&amp;gt; &amp;gt; MATLAB command line, it executes without issue.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; The most frustrating thing is that the errors are not&lt;br&gt;
&amp;gt; &amp;gt; repeatable.  If I clear memory and rerun, it sometimes will&lt;br&gt;
&amp;gt; &amp;gt; work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
&amp;gt; &amp;gt; script, or at another point in the loop.  I've only recently&lt;br&gt;
&amp;gt; &amp;gt; run in to this issue, as well.  I can sometimes get the&lt;br&gt;
&amp;gt; &amp;gt; error running older code that I hadn't run in a long time&lt;br&gt;
&amp;gt; &amp;gt; and had no problems with when I ran it months ago.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I assume there's something wrong with my computer or the&lt;br&gt;
&amp;gt; &amp;gt; script I'm running.  As it appears somewhat randomly I am at&lt;br&gt;
&amp;gt; &amp;gt; a loss for fixing it.  For completeness, here is my most&lt;br&gt;
&amp;gt; &amp;gt; recent error message:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; ?? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; &amp;gt; or logicals.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;gt; &amp;gt;                 ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;gt; &amp;gt;             trt = track(xyt', trackdist, params);&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; lenxn = trackdist = 25&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ============================================================&lt;br&gt;
&amp;gt; Put a breakpoint there and check the workspace to see if&lt;br&gt;
it calls ymat&lt;br&gt;
&amp;gt; an array of integers or doubles.&lt;br&gt;
&amp;gt; Also, you can do class(ymat) in the command window at that&lt;br&gt;
breakpoint&lt;br&gt;
&amp;gt; to see what MATLAB thinks it really is.&lt;br&gt;
&amp;gt; It will report back the data type it considers it: some&lt;br&gt;
flavor or&lt;br&gt;
&amp;gt; floating point, or some flavor of integer.&lt;br&gt;
&amp;gt; Good luck,&lt;br&gt;
&amp;gt; ImageAnalyst&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks for the suggestions, but I'm afraid I didn't do a&lt;br&gt;
good job of detailing my problem.  I am running data&lt;br&gt;
analysis on a number of files in a loop.  The command that&lt;br&gt;
crashes is always a pair like this:&lt;br&gt;
&lt;br&gt;
negative = find(ydata &amp;lt; 0);&lt;br&gt;
plot(xdata(negative), -ydata(negative), '.');&lt;br&gt;
&lt;br&gt;
for most of the iterations through the loop, it works fine,&lt;br&gt;
but at some point it gives the above message.  The confusing&lt;br&gt;
things to me are:&lt;br&gt;
&lt;br&gt;
1)  it doesn't always stop at the same place in the loop&lt;br&gt;
2)  it doesn't always happen, sometimes it works, sometimes&lt;br&gt;
it doesn't&lt;br&gt;
3)  if I look at the array negative, it is filled with&lt;br&gt;
positive integers.  max(negative-floor(negative)) = 0.&lt;br&gt;
4)  if I simply copy the failed command from the command&lt;br&gt;
window the command works without fail.&lt;br&gt;
&lt;br&gt;
My real question is:  why does the same exact code not&lt;br&gt;
always produce the same exact results?</description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 20:26:45 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#398595</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;ffthkg$dd$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Matthew Sullivan &amp;lt;nospam@nospam.no&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;My real question is:  why does the same exact code not&lt;br&gt;
&amp;gt;always produce the same exact results?&lt;br&gt;
&lt;br&gt;
Turn off JIT (Just In Time Compiling) and you may see more&lt;br&gt;
consistant results.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;History is a pile of debris&quot;                     -- Laurie Anderson</description>
    </item>
    <item>
      <pubDate>Wed, 31 Oct 2007 17:32:14 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#399246</link>
      <author>Matthew Sullivan</author>
      <description>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;fftii5$2ns$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;ffthkg$dd$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; Matthew Sullivan &amp;lt;nospam@nospam.no&amp;gt; wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;My real question is:  why does the same exact code not&lt;br&gt;
&amp;gt; &amp;gt;always produce the same exact results?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Turn off JIT (Just In Time Compiling) and you may see more&lt;br&gt;
&amp;gt; consistant results.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt;    &quot;History is a pile of debris&quot;                     --&lt;br&gt;
Laurie Anderson&lt;br&gt;
&lt;br&gt;
That sounds like a good idea.  I can't figure out how to&lt;br&gt;
turn off JIT, though.  How do I do that?&lt;br&gt;
Thanks</description>
    </item>
    <item>
      <pubDate>Wed, 31 Oct 2007 18:29:02 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#399258</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fgae6u$p07$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Matthew Sullivan &amp;lt;nospam@nospam.no&amp;gt; wrote:&lt;br&gt;
&amp;gt;roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
&amp;gt;message &amp;lt;fftii5$2ns$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; Turn off JIT (Just In Time Compiling) and you may see more&lt;br&gt;
&amp;gt;&amp;gt; consistant results.&lt;br&gt;
&lt;br&gt;
&amp;gt;That sounds like a good idea.  I can't figure out how to&lt;br&gt;
&amp;gt;turn off JIT, though.  How do I do that?&lt;br&gt;
&lt;br&gt;
feature('JIT',0)&lt;br&gt;
&lt;br&gt;
To turn it back on,&lt;br&gt;
&lt;br&gt;
feature('JIT',1)&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;I will speculate that [...] applications [...] could actually see a&lt;br&gt;
&amp;nbsp;&amp;nbsp;performance boost for most users by going dual-core [...] because it&lt;br&gt;
&amp;nbsp;&amp;nbsp;is running the adware and spyware that [...] are otherwise slowing&lt;br&gt;
&amp;nbsp;&amp;nbsp;down the single CPU that user has today&quot;           -- Herb Sutter</description>
    </item>
    <item>
      <pubDate>Thu, 01 Nov 2007 02:32:43 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#399321</link>
      <author> ImageAnalyst</author>
      <description>On Oct 26, 4:10 pm, &quot;Matthew Sullivan&quot; &amp;lt;nos...@nospam.no&amp;gt; wrote:&lt;br&gt;
&amp;gt;  ImageAnalyst &amp;lt;imageanal...@mailinator.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;lt;1193413162.578228.104...@o3g2000hsb.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; On Oct 26, 10:46 am, &quot;Matthew Sullivan&quot; &amp;lt;nos...@nospam.no&amp;gt;&lt;br&gt;
&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I've been running in to a strange MATLAB script problem that&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;Subscript indices must either be real positive integers or&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; logicals.&quot;  The indices I use are real positive integers,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; though. When I copy and past the offending commend in to the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; MATLAB command line, it executes without issue.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The most frustrating thing is that the errors are not&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; repeatable.  If I clear memory and rerun, it sometimes will&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; script, or at another point in the loop.  I've only recently&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; run in to this issue, as well.  I can sometimes get the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; error running older code that I hadn't run in a long time&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; and had no problems with when I ran it months ago.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I assume there's something wrong with my computer or the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; script I'm running.  As it appears somewhat randomly I am at&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; a loss for fixing it.  For completeness, here is my most&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; recent error message:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; ?? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; or logicals.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;                 ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;             trt = track(xyt', trackdist, params);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; lenxn = trackdist = 25&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; ============================================================&lt;br&gt;
&amp;gt; &amp;gt; Put a breakpoint there and check the workspace to see if&lt;br&gt;
&amp;gt; it calls ymat&lt;br&gt;
&amp;gt; &amp;gt; an array of integers or doubles.&lt;br&gt;
&amp;gt; &amp;gt; Also, you can do class(ymat) in the command window at that&lt;br&gt;
&amp;gt; breakpoint&lt;br&gt;
&amp;gt; &amp;gt; to see what MATLAB thinks it really is.&lt;br&gt;
&amp;gt; &amp;gt; It will report back the data type it considers it: some&lt;br&gt;
&amp;gt; flavor or&lt;br&gt;
&amp;gt; &amp;gt; floating point, or some flavor of integer.&lt;br&gt;
&amp;gt; &amp;gt; Good luck,&lt;br&gt;
&amp;gt; &amp;gt; ImageAnalyst&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks for the suggestions, but I'm afraid I didn't do a&lt;br&gt;
&amp;gt; good job of detailing my problem.  I am running data&lt;br&gt;
&amp;gt; analysis on a number of files in a loop.  The command that&lt;br&gt;
&amp;gt; crashes is always a pair like this:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; negative = find(ydata &amp;lt; 0);&lt;br&gt;
&amp;gt; plot(xdata(negative), -ydata(negative), '.');&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; for most of the iterations through the loop, it works fine,&lt;br&gt;
&amp;gt; but at some point it gives the above message.  The confusing&lt;br&gt;
&amp;gt; things to me are:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 1)  it doesn't always stop at the same place in the loop&lt;br&gt;
&amp;gt; 2)  it doesn't always happen, sometimes it works, sometimes&lt;br&gt;
&amp;gt; it doesn't&lt;br&gt;
&amp;gt; 3)  if I look at the array negative, it is filled with&lt;br&gt;
&amp;gt; positive integers.  max(negative-floor(negative)) = 0.&lt;br&gt;
&amp;gt; 4)  if I simply copy the failed command from the command&lt;br&gt;
&amp;gt; window the command works without fail.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; My real question is:  why does the same exact code not&lt;br&gt;
&amp;gt; always produce the same exact results?- Hide quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -&lt;br&gt;
&lt;br&gt;
===========================================&lt;br&gt;
Matthew:&lt;br&gt;
Are you 100% sure that negative is NEVER null?  Does it still crash if&lt;br&gt;
you do something like:&lt;br&gt;
negative = find(ydata &amp;lt; 0);&lt;br&gt;
if ~isempty(negative)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;plot(xdata(negative), -ydata(negative), '.');&lt;br&gt;
end&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst</description>
    </item>
    <item>
      <pubDate>Fri, 02 Nov 2007 00:33:17 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#399509</link>
      <author>Matthew Sullivan</author>
      <description>&amp;nbsp;ImageAnalyst &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;1193884363.080919.312120@22g2000hsm.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; On Oct 26, 4:10 pm, &quot;Matthew Sullivan&quot; &amp;lt;nos...@nospam.no&amp;gt;&lt;br&gt;
wrote:&lt;br&gt;
&amp;gt; &amp;gt;  ImageAnalyst &amp;lt;imageanal...@mailinator.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;1193413162.578228.104...@o3g2000hsb.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; On Oct 26, 10:46 am, &quot;Matthew Sullivan&quot; &amp;lt;nos...@nospam.no&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I've been running in to a strange MATLAB script&lt;br&gt;
problem that&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I don't quite understand.  The specific error I get is&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &quot;Subscript indices must either be real positive&lt;br&gt;
integers or&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; logicals.&quot;  The indices I use are real positive&lt;br&gt;
integers,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; though. When I copy and past the offending commend&lt;br&gt;
in to the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; MATLAB command line, it executes without issue.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; The most frustrating thing is that the errors are not&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; repeatable.  If I clear memory and rerun, it&lt;br&gt;
sometimes will&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; work.  Other times, it seems to stop elsewhere in the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; script, or at another point in the loop.  I've only&lt;br&gt;
recently&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; run in to this issue, as well.  I can sometimes get the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; error running older code that I hadn't run in a long&lt;br&gt;
time&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; and had no problems with when I ran it months ago.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I assume there's something wrong with my computer or the&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; script I'm running.  As it appears somewhat randomly&lt;br&gt;
I am at&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; a loss for fixing it.  For completeness, here is my most&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; recent error message:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; ?? Subscript indices must either be real positive&lt;br&gt;
integers&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; or logicals.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Error in ==&amp;gt; track at 502&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;                 ym = y(ymat(1:lenxn,1:lenxm));&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Error in ==&amp;gt; deflect_stitch_2 at 103&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;             trt = track(xyt', trackdist, params);&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; lenxn = trackdist = 25&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;br&gt;
============================================================&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Put a breakpoint there and check the workspace to see if&lt;br&gt;
&amp;gt; &amp;gt; it calls ymat&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; an array of integers or doubles.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Also, you can do class(ymat) in the command window at that&lt;br&gt;
&amp;gt; &amp;gt; breakpoint&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; to see what MATLAB thinks it really is.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; It will report back the data type it considers it: some&lt;br&gt;
&amp;gt; &amp;gt; flavor or&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; floating point, or some flavor of integer.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Good luck,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; ImageAnalyst&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks for the suggestions, but I'm afraid I didn't do a&lt;br&gt;
&amp;gt; &amp;gt; good job of detailing my problem.  I am running data&lt;br&gt;
&amp;gt; &amp;gt; analysis on a number of files in a loop.  The command that&lt;br&gt;
&amp;gt; &amp;gt; crashes is always a pair like this:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; negative = find(ydata &amp;lt; 0);&lt;br&gt;
&amp;gt; &amp;gt; plot(xdata(negative), -ydata(negative), '.');&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; for most of the iterations through the loop, it works fine,&lt;br&gt;
&amp;gt; &amp;gt; but at some point it gives the above message.  The confusing&lt;br&gt;
&amp;gt; &amp;gt; things to me are:&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 1)  it doesn't always stop at the same place in the loop&lt;br&gt;
&amp;gt; &amp;gt; 2)  it doesn't always happen, sometimes it works, sometimes&lt;br&gt;
&amp;gt; &amp;gt; it doesn't&lt;br&gt;
&amp;gt; &amp;gt; 3)  if I look at the array negative, it is filled with&lt;br&gt;
&amp;gt; &amp;gt; positive integers.  max(negative-floor(negative)) = 0.&lt;br&gt;
&amp;gt; &amp;gt; 4)  if I simply copy the failed command from the command&lt;br&gt;
&amp;gt; &amp;gt; window the command works without fail.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; My real question is:  why does the same exact code not&lt;br&gt;
&amp;gt; &amp;gt; always produce the same exact results?- Hide quoted text -&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; - Show quoted text -&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ===========================================&lt;br&gt;
&amp;gt; Matthew:&lt;br&gt;
&amp;gt; Are you 100% sure that negative is NEVER null?  Does it&lt;br&gt;
still crash if&lt;br&gt;
&amp;gt; you do something like:&lt;br&gt;
&amp;gt; negative = find(ydata &amp;lt; 0);&lt;br&gt;
&amp;gt; if ~isempty(negative)&lt;br&gt;
&amp;gt;     plot(xdata(negative), -ydata(negative), '.');&lt;br&gt;
&amp;gt; end&lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; ImageAnalyst&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
I am 100% sure that negative is never null.  When I look at&lt;br&gt;
it, it is always a list of positive numbers.  Furthermore,&lt;br&gt;
when I just cut and past the last command it works without&lt;br&gt;
problem.&lt;br&gt;
&lt;br&gt;
I turned JIT off and I still get the randomly get these&lt;br&gt;
errors.  It has become so bad that I can't run scripts for &amp;gt;&lt;br&gt;
20 files without always getting these errors.</description>
    </item>
    <item>
      <pubDate>Fri, 02 Nov 2007 03:10:24 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#399519</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Matthew Sullivan&quot; &amp;lt;nospam@nospam.no&amp;gt; wrote in message &lt;br&gt;
news:fgdr8d$me2$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; ImageAnalyst &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;1193884363.080919.312120@22g2000hsm.googlegroups.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
*snip*&lt;br&gt;
&lt;br&gt;
&amp;gt; I am 100% sure that negative is never null.  When I look at&lt;br&gt;
&amp;gt; it, it is always a list of positive numbers.  Furthermore,&lt;br&gt;
&amp;gt; when I just cut and past the last command it works without&lt;br&gt;
&amp;gt; problem.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I turned JIT off and I still get the randomly get these&lt;br&gt;
&amp;gt; errors.  It has become so bad that I can't run scripts for &amp;gt;&lt;br&gt;
&amp;gt; 20 files without always getting these errors.&lt;br&gt;
&lt;br&gt;
Type &quot;dbstop if error&quot; without the quotes at the prompt, then run your code. &lt;br&gt;
When you receive an error, you'll enter debug mode (the K&amp;gt;&amp;gt; prompt).  From &lt;br&gt;
there, you can see the line where the error is thrown and examine the exact &lt;br&gt;
contents of the variables as they exist at the time that line is executed. &lt;br&gt;
Double-check that all the variables you use as indices on that line contain &lt;br&gt;
positive integers or logicals. Once you've finished your investigation, use &lt;br&gt;
&quot;dbquit&quot; to exit debug mode and &quot;dbclear all&quot; to remove the condition that &lt;br&gt;
caused you to enter debug mode when you received an error.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Sat, 03 Nov 2007 22:03:07 -0400</pubDate>
      <title>Re: Strange errors</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158377#399727</link>
      <author>Matthew Sullivan</author>
      <description>&quot;Steven Lord&quot; &amp;lt;slord@mathworks.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fge4f0$126$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Matthew Sullivan&quot; &amp;lt;nospam@nospam.no&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:fgdr8d$me2$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; ImageAnalyst &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;1193884363.080919.312120@22g2000hsm.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; *snip*&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I am 100% sure that negative is never null.  When I look at&lt;br&gt;
&amp;gt; &amp;gt; it, it is always a list of positive numbers.  Furthermore,&lt;br&gt;
&amp;gt; &amp;gt; when I just cut and past the last command it works without&lt;br&gt;
&amp;gt; &amp;gt; problem.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I turned JIT off and I still get the randomly get these&lt;br&gt;
&amp;gt; &amp;gt; errors.  It has become so bad that I can't run scripts for &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; 20 files without always getting these errors.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Type &quot;dbstop if error&quot; without the quotes at the prompt,&lt;br&gt;
then run your code. &lt;br&gt;
&amp;gt; When you receive an error, you'll enter debug mode (the&lt;br&gt;
K&amp;gt;&amp;gt; prompt).  From &lt;br&gt;
&amp;gt; there, you can see the line where the error is thrown and&lt;br&gt;
examine the exact &lt;br&gt;
&amp;gt; contents of the variables as they exist at the time that&lt;br&gt;
line is executed. &lt;br&gt;
&amp;gt; Double-check that all the variables you use as indices on&lt;br&gt;
that line contain &lt;br&gt;
&amp;gt; positive integers or logicals. Once you've finished your&lt;br&gt;
investigation, use &lt;br&gt;
&amp;gt; &quot;dbquit&quot; to exit debug mode and &quot;dbclear all&quot; to remove&lt;br&gt;
the condition that &lt;br&gt;
&amp;gt; caused you to enter debug mode when you received an error.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; Steve Lord&lt;br&gt;
&amp;gt; slord@mathworks.com &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
That was a useful tip, but again in debug mode everything&lt;br&gt;
checks out (all positive integers).  Running the command&lt;br&gt;
that sent me to debug mode in debug mode works fine.  I'm&lt;br&gt;
still at a loss for what could be going on.  &lt;br&gt;
&lt;br&gt;
As a possible workaround, is there an equivalent to the IDL&lt;br&gt;
command (I'm really showing my roots) .continue?  That&lt;br&gt;
wouldn't solve the root problem, but it stop it from&lt;br&gt;
annoying me?&lt;br&gt;
&lt;br&gt;
Thanks again,&lt;br&gt;
Matt</description>
    </item>
  </channel>
</rss>

