[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: |
Wed, 15 Feb 2012 08:48:33 -0800 |
Sorry, I'm posting this again because I still don't know how to proceed.
-----
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