LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need help with simply random function

I have a task to draw 10 numbers and calculate their average, only to calculate the average of the first 5 drawn numbers and the average of the 10 drawn numbers
anyone can help me i cant on my PC becouse i dont have this program but i have exam with this and big problem
 
0 Kudos
Message 1 of 9
(456 Views)

@LazyNoob wrote:
anyone can help me i cant on my PC becouse i dont have this program but i have exam with this and big problem
 

This is a small problem. The purpose on any exam is to see if YOU can solve the problem yourself. if you don't know how to solve this very simple task, it would be incorrect for you to pass that exam.

Obviously this must have been a beginners programming class, so look at your course notes. It should all be there!

 

Once you show some efforts and show us what you tried by attaching what you did so far, we might nudge you in the right direction.

0 Kudos
Message 2 of 9
(447 Views)

good but this is a dangerous situation can u help?

0 Kudos
Message 3 of 9
(442 Views)

@LazyNoob wrote:

Username appropriately selected.  😁

aputman
Message 4 of 9
(401 Views)

@LazyNoob wrote:

good but this is a dangerous situation can u help?


Again, what have you tried so far? We can help with very specific questions about the problem. 

 

  • Do you have LabVIEW installed?
  • Do you know how to create a new VI?
  • To generate a random number, you need to decide what kind (integer in a give range? Anything between 0 an 1?, something else?)
  • To generate an array of ten random numbers, you can use a FOR loop. Do you know what a FOR loop is?
  • You can calculate the average on the full array or on any desired subset. Are you familiar with the math behind the calculation of an average?
  • You probably want to display the array of ten numbers as well as the two averages, so you need indicators. Do you know how to do that?
  • Once the program is complete, do you know how to run it?
  • If the result is not as expected, do you know how to debug it?

This entire problem is trivially simple for anyone that has used LabVIEW for 30 minutes. If you would have sat down and tried, you would have solved it in the time you were waiting for a turnkey answer. You must already have all the tools to do this, else it would not be on the test.

 

Yes, there is a danger of failing that test, but that would be the correct result if you cannot do it.

0 Kudos
Message 5 of 9
(353 Views)

Unlike the languages that many of us learned, where you programmed by writing Text, so you could take a C, or Basic, or Fortran course and never handle a deck of cards, or sat in front of a computer terminal and typed in your code, compiled it, and ran it, and still convince your instructor that you could "write a good program" (it's all text, right?)

 

But LabVIEW is different.  Unless you are a good artist, it's hard to "draw" a Front Panel and Block Diagram, and if you have many of them in a "Project", keeping them organized will certainly require "folders".

 

So if you never got LabVIEW installed on your computer (or one you could use), do that at once.  Then review your notes from the class, talk to your fellow students, and do the work (or drop the class).

 

Bob Schor

0 Kudos
Message 6 of 9
(335 Views)

Loop 10 times to generate a Random array, Extract the 1st 5 and Mean it and do the same with the full array.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 9
(308 Views)

@aputman wrote:

@LazyNoob wrote:

Username appropriately selected.  😁


You have to assume this was actually a meme generator! For that I would give him a point.

If this is serious, one only can wonder about some people's state of mind.

But then you only have to look at the news every day and wonder even more.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 8 of 9
(297 Views)

The same day that @LazyNoob posted his/her first message, he (or she) joined the Forum, logged in the next day, and has otherwise been silent.  At about the same time, another New User using the name Outkasst, also joined the Forum and posted a message on a thread I was following asking me if I lived in the US and could help him (or her) with a Roll/Pitch/Yaw issue.  This user also last visited on July 4, but has only the initial single post.

 

I smell a phish.  Perhaps we (and by "we", I mean "I", as well) should be more cautious ...

 

Bob Schor

0 Kudos
Message 9 of 9
(226 Views)