02-27-2012 08:09 AM
My teacher is the problem that needs to be in the range -20 <x <20 to the input of random values, so that in each case in each case by the full post (dasd.vi). now this was my problem by changing the input values into the from -infinity <x <infinity is just a random, like him, and to show that it is worth it. The show is the Inf.
It would help me.
It is a project of mine.
02-27-2012 08:34 AM
First off, your VI is in LabVIEW 2011, but your message title says LabVIEW 8, so I don't know which version you're trying to target.
Second... I'm sorry, but I could not understand anything of what you are asking. Are you saying you want to show +Inf/-Inf instead of NaN?
It's clear your first language is not English, so I'm not sure if you tried to translate the message yourself, or if you tried to use an online translation tool. I'd suggest posting in your native language, and perhaps someone who knows it can provide a better translation.
02-27-2012 09:24 AM
Sorry, I use LabView 2011.
02-27-2012 09:26 AM
And I want the value from the range-infinity to infinity can be removed at the output
02-27-2012 10:05 AM
@ToNTi wrote:
And I want the value from the range-infinity to infinity can be removed at the output
I still don't know what that means. What is "removed from the output"? You cannot remove an output, but you could format it uniquely, e.g. as an empty string. Do you mean coerced?
Your code is like cheese: full of holes and smelly. For example, do you really want that gap if the random value is between 10 and 11.
02-27-2012 10:43 AM
02-27-2012 10:47 AM
You are still talking gibberish. Maybe you can attach an image to show how the output should look like?
Maybe you want to delete the code from case "dddd" and wire a "+Inf" diagram constant to the two output tunnels?
02-27-2012 12:01 PM - edited 02-27-2012 12:08 PM
@ToNTi wrote:
I want the value from-infinity to infinity to show that output by the output from the "inf".
Perhaps I'm misunderstanding your question, but I think the problem is in your understanding of the concept of infinity. You can't represent a continuum from -infinity to +infinity in any numbering system (data type). Let me explain what I mean.
Here's how I'd make a number vary from -10 to +10:
I can increase the range by increasing the constant at the multiplication node. You get into trouble when you want to increase the range beyond the limits of the Double data type (+/- 1.79e+308). See, infinity is not a number so you can't perform (sensible) mathematical operations on it.
The best you can do is make a range from -[largest negative number for data type] to +[largest positive number for data type]. And tell your teacher what I've told you.
@ToNTi wrote:
My teacher is the problem [...]
I've been there! 🙂
02-27-2012 12:34 PM
thank you jcarmody ,
02-27-2012 03:36 PM
@ToNTi wrote:
thank you jcarmody ,
But I'm afraid. The teacher will not understand. And still think it can be done.
Well then we are going to have to cheet! (Time to get some bit level magic)
Create two arrays of 32 random booleans (use the clip from Jim to generate random booleans) Run each array through Bool array to number join the two numbers to make a 64 bit integer.
(Now we have random bits in memory in a 64 bit field) Type-cast to DBL and test if it is equal to itself (If its not throw it out. its NaN) every concievable value a DBL can assume will be possible in the output including +/- inf
CAVEAT: the distribution will not be gaussian. This method will favor dbls whose representation in memory has approximatly even 1-0 distribution.