<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Hello,<br>
<br>
Is there a function to calculate the running length of 0/1s in a sequence in NCL?<br>
<br>
for example if I had a vector&nbsp;&nbsp;&nbsp;&nbsp; v : 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 0 ...<br>
the running sequence would be&nbsp;&nbsp; : 0 0 0 0 1 0 0 1 2 3 4 0 0 1 2 0 ...<br>
<br>
I see the function dim_numrun counts the number of unique sequence lengths which is similar but not exactly what I am after ....&nbsp;</div>
<p></p>
<p><br>
</p>
<p>Thanks,</p>
<p>Peter<br>
</p>
</div>
</body>
</html>