05-19-2011 10:05 AM - edited 05-19-2011 10:08 AM
Seen here:
https://decibel.ni.com/content/docs/DOC-13641
Is it really too much to ask that the NI developers writing these functions actually LOOK at the comparisson palette when they open it?
Come on - really!! - makes you wonder what the dll is like inside doesn't it?
06-08-2011 02:52 PM - edited 06-08-2011 02:52 PM
What would possess somebody to take a simple scalar, turn it into an array with a single element, integrate the single element array using simpsons rule, then index out the single element at the end???
06-08-2011 04:12 PM
I don't know what the top code does, but multiplying by 2 and then dividing by 30 also seems Rube'd... 😉
06-08-2011 04:33 PM
You got me there! I simply did not want to multiply by typing 0.06666666666666666666666666666666666666666666666666... . 😄
(of course I could have divided by 15 instead).
(The weird simpson scaling is not appropriate for an array with a single element. A multiplication by 0.1 is probably what's really needed here)
06-10-2011 09:10 AM - edited 06-10-2011 09:12 AM
Did I create a Rube Goldberg, or is there a better way of doing the following?
I want to extract the lower 16 bits of a number.
Ignore the extra indicator in the code snippet. It is the residue of a probe while converting to snippet.
I am replacing the lower 16 bits with zeros and then taking the difference. The result are the lower 16 bits.
It's been an extremely long week and my brain has slowed down. I seem to recall that there was an easier way of doing this, but I just can't access those braincells.
06-10-2011 09:24 AM
@Ray.R wrote:
Did I create a Rube Goldberg, or is there a better way of doing the following?
I want to extract the lower 16 bits of a number.
Ignore the extra indicator in the code snippet. It is the residue of a probe while converting to snippet.
I am replacing the lower 16 bits with zeros and then taking the difference. The result are the lower 16 bits.
It's been an extremely long week and my brain has slowed down. I seem to recall that there was an easier way of doing this, but I just can't access those braincells.
yes, you did RG
06-10-2011 09:29 AM
You could also use the To Unsigned Word Integer (U16). You'd get a coercion dot to move up to I32, but in this case who cares.
06-10-2011 09:37 AM
06-10-2011 09:40 AM
@Jeff Bohrer wrote:
a few ways to skin the cat
Yeah. I just assumed there was a reason for the indicator being an I32.
Ray: is there something more going on?
06-10-2011 09:50 AM - edited 06-10-2011 09:51 AM
The problem with "split number" is the change from I32 to U16, changing the representation. Here's what I would do: