<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2800.1649" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff size=2>Hi
Marcin,</FONT></SPAN></DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff size=2>It
looks like the loop never terminates because the matrix ok never becomes
empty. I added a disp(ok) in the loop to check. You need to do
something in the loop that reduces the matrix ok by deleting rows. In my
example that I sent you, I used A(Index, :) = []; to accomplish
this.</FONT></SPAN></DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff size=2>In
your code, it looks like you are trying to reduce ok using ok =
ok(m_ksr,1:4);. However, m_ksr always has all 18 entries, so it does not
reduce ok at all. m_ksr in turn comes from the zero entries in ks_r.
When I display this matrix, I find it is always all zero.</FONT></SPAN></DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff size=2>So it
looks like some logic error in your code. You can debug it using disp
statements or pause statements, or using the debugger built into SciPad which is
available in Scilab 4.0, but not later versions.</FONT></SPAN></DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2>HTH.</FONT></SPAN></DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2>Mike.</FONT></SPAN></DIV>
<DIV><SPAN class=344153915-06102010><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> marcin.wozniczka Gazeta.pl
[mailto:marcin.wozniczka@gazeta.pl]<BR><B>Sent:</B> 06 October 2010
16:12<BR><B>To:</B> users@lists.scilab.org<BR><B>Subject:</B> Re:
[scilab-Users] Problem with loop<BR><BR></FONT></DIV>Hi,
<DIV>so I tried to use while function but when I'm checking the result scilab
hang. I'm sending my script, maybe someone of you will know how to change
'while' function <BR>-- <BR>Marcin
Wo¼niczka<BR></DIV></BLOCKQUOTE></BODY></HTML>