LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Probability with random number and case structure

Hi

 

I would like to simulate probability function. I would like that an event has .75 probability to occur. I attached here my solution but I am not sure that it is the best way.

 

Thank you in advance.

0 Kudos
Message 1 of 11
(3,545 Views)

I think there is something wrong with your attachment.

Can you repost it?

 

(or is it my computer ?)

0 Kudos
Message 2 of 11
(3,532 Views)

The VI's name is invalid for HTML publishing.

HTML understands '%' as escape character for formating, for instance german umlaut are something like "%auml;"....

 

So please rename the VI.

 

thanks,

Norbert 

 

[EDIT]: Tho most common format string in HTML would be %20 for a blank (space). 

Message Edited by Norbert B on 12-09-2008 08:05 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 11
(3,527 Views)
Sorry, I repost it.
0 Kudos
Message 4 of 11
(3,521 Views)

Hi,

 

try this VI.

 

I did not understand yours....

0 Kudos
Message 5 of 11
(3,516 Views)
How about this?
Gregory Osenbach
0 Kudos
Message 6 of 11
(3,514 Views)
I just understood your vi, and yes, you win 75% of the time
0 Kudos
Message 7 of 11
(3,509 Views)

Very strange thinking, unnecessary code.... but i think correct result !

Smiley Surprised

 

 

0 Kudos
Message 8 of 11
(3,506 Views)
Okay thank you all.
0 Kudos
Message 9 of 11
(3,504 Views)

Also remember that all code that is common in all frames of a case structure should be outside the case structure. (e.g. the dialog box in your case).

 

Here's what I would do instead.

 

 

Also, remember that is is very easy to generate random numbers with complicated probability profiles, for example as described here:

 

Message Edited by altenbach on 12-09-2008 08:48 AM
Message 10 of 11
(3,484 Views)