No transition from 'Abort' to 'Ready' state in Igor

I've written a function that seemingly does what I want it to do and alters the wave accordingly. However the 'Abort' icon in the bottom left corner keeps ticking over as if it's still working. Does anybody know the reasons why this might happen? The simple function I wrote is below if anybody spots something wrong with it.

function thresh2diam()
wave caspbp
variable i
    for (i=1;dimsize(caspbp,0);i=i+1)
        if (caspbp[i][1]<=180)
            caspbp[i][1]=0.61
        elseif (caspbp[i][1]<=333)
            caspbp[i][1]=0.68
        endif
    endfor
end

thunderstruck wrote:
I've written a function that seemingly does what I want it to do and alters the wave accordingly. However the 'Abort' icon in the bottom left corner keeps ticking over as if it's still working. Does anybody know the reasons why this might happen? The simple function I wrote is below if anybody spots something wrong with it.

function thresh2diam()
wave caspbp
variable i
    for (i=1;dimsize(caspbp,0);i=i+1)
        if (caspbp[i][1]<=180)
            caspbp[i][1]=0.61
        elseif (caspbp[i][1]<=333)
            caspbp[i][1]=0.68
        endif
    endfor
end


 for (i=1;dimsize(caspbp,0);i=i+1)

does not impose a limit on the loop

you may have meant to write

 for (i=1;i < dimsize(caspbp,0);i=i+1)


jtigor wrote:
thunderstruck wrote:
I've written a function that seemingly does what I want it to do and alters the wave accordingly. However the 'Abort' icon in the bottom left corner keeps ticking over as if it's still working. Does anybody know the reasons why this might happen? The simple function I wrote is below if anybody spots something wrong with it.

function thresh2diam()
wave caspbp
variable i
    for (i=1;dimsize(caspbp,0);i=i+1)
        if (caspbp[i][1]<=180)
            caspbp[i][1]=0.61
        elseif (caspbp[i][1]<=333)
            caspbp[i][1]=0.68
        endif
    endfor
end


 for (i=1;dimsize(caspbp,0);i=i+1)

does not impose a limit on the loop

you may have meant to write

 for (i=1;i < dimsize(caspbp,0);i=i+1)


Thanks! Yes the intention was to impose a limit, my eyes must be tired!