help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why doesn't pause work in a function


From: J Stasko
Subject: Why doesn't pause work in a function
Date: Mon, 13 Feb 2012 16:02:31 -0800

I didn't see this in the documentation...  Here's my function code:

function plottrack(x)
   [slices,values] = size(x)
   for i = 0 : ((values-3)/6)-2
   i
   pause
   plot(x(:,(i*6)+4),x(:,(i*6)+5))
   pause
   endfor
endfunction


Here's the output:

octave-3.4.0:2> plottrack(snaps)
slices =  31
values =  183
error: plottrack: A(I,J): column index out of bounds; value 183 out of bound 183
error: called from:
error:   /Users/johns/Programming/diameter/plottrack.m at line 4, column 4
octave-3.4.0:2>


So really, there are two questions.  One is why, when i = 28 the
calculation can yield a column index out of bounds...

The other is, as I was trying to debug it using "i" and "pause", I
neither see the value for i nor do I get the pause on my display.

Thanks for all the help!

-John Stasko


reply via email to

[Prev in Thread] Current Thread [Next in Thread]