cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform graph random integers

LABVIEW321
Member

Waveform graph random integers

Message contains an attachment

This is part of the problem I'm doing, I'm suppose to produce 20 random integers between 0 and 100 and have them on the waveform graph. The way I have it setup I think is that it is running from 0 to 19 times and that it connect to the graph. Is this correct?

9 REPLIES 9
Joseph_Loo
Active Participant

Re: Waveform graph random integers

If Iwas going to critique your setup, I would say you did not accomplish it. First, you did not plot 20 integers between 0 and 100. You plotted 19 floating point numbers.

RobAfton
Member

Re: Waveform graph random integers

Loo is right, if you want integers you should use one of the "Round to ___" vis that are on the Numeric Palette.

Also you should wire 20 to your N input, then it will run 20 times (from 0 to 19).  The way you have it will only run 0 to 18 (19 total numbers).

LABVIEW321
Member

Re: Waveform graph random integers

Message contains an attachment

alright got it, umm am i still plotting floating numbers still =/

 

Should I initalize an array from 0 to 20 for it to work the way i want?

 

 

Joseph_Loo
Active Participant

Re: Waveform graph random integers

Instead of a ceiling function I would just convert it to integer. The way you have it setup, 0 is highly unlikely to ever be selected in your list.

LABVIEW321
Member

Re: Waveform graph random integers

Message contains an attachment

like this?

 

also am I still plotting 20 floating numbers?

Joseph_Loo
Active Participant

Re: Waveform graph random integers

That is much better.

 

I looked through the previous post. You never mentioned what kind of random numbers you want. What you have there is a uniform distribution. Do you want guassian, normal, exponential? If so, you will need to do more research on random number generation.

LABVIEW321
Member

Re: Waveform graph random integers

well random numbers integers just between 0 and 100 and I want to plot the 20 random numbers on the wave form graph =)

Highlighted
LABVIEW321
Member

Re: Waveform graph random integers

is the setup correct or do i have to add something else?

Joseph_Loo
Active Participant

Re: Waveform graph random integers

There are different type of random numbers. What you currently have is a uniform distribution. There ar normal, exponential, etc. types of random numbers. That is the question you should be researching now. You have the basics. Your next step is to determine the rest of the information.