<div dir="ltr"><div><div><div><div><div>Hi Kevin,<br><br></div>I get the same result. However, your case is not exactly like the examples page, which depicts a sequence of bits, whereas you are feeding a sequence of bytes into the function. If you look at the series of bits within those bytes:<br><br>0000 0000 | 0000 0001 | 0000 0000 ...<br>^ ^ ^<br></div>x[0] x[1] x[2] ...<br><br></div>and then perform the dim_gbits decomposition on that, you do indeed get (/ 0, 0, 2, 0 /)<br><br></div>Hope that helps...<br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 6:00 AM, Kevin Vermeesch <span dir="ltr"><<a href="mailto:kevin.c.vermeesch@nasa.gov" target="_blank">kevin.c.vermeesch@nasa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<font size="+1"><font face="Courier New">Hi,<br>
I'm trying to use the built-in function dim_gbits (<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_gbits.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_gbits.shtml</a>)
and am not getting the expected result while trying the example
in the link above. Looking at the worked example in the
Description Section, I used the following commands:<br>
<br>
x = tobyte((/0,1,0,1,0,1,1,1,1,1,1,0,0,1,0,0,1,1,0,1,0,0/))<br>
print(dim_gbits(x,5,2,3,4))<br>
<br>
I get: (/0,0,2,0/)<br>
when I was expecting to get: (/3,2,1,0/) as the example
indicates.<br>
<br>
I am using version 6.1.0 (Cygwin) and 6.2.1 (32-bit CentOS). Is
this a bug or am I not using/understanding the function
correctly?<br>
thanks,<br>
Kevin</font></font>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>