Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

PHYS 580 HW#2

Due: 15 March 2012 For each question create a LabVIEW vi, labeled HW1QX, where X=question number. Then pack all these files in a ZIP or RAR file and submit them to ekarademir@fen.bilkent.edu.tr with subject: PHYS 580 HW1. You may use any LabVIEW version. You can get the trial one from NI's website (see course web page). 1) Create a VI that takes two integers (Label them Number1 and Number2) and adds them if Number 1 smaller than Number2, and subtracts them otherwise. 1 1 1 2) Create a VI that calculates number e, ( e =1 +1+ + ++ +) up to k = 100. 2! 3! k! Compare this to actual e (in your program) by calculating the error percentage. 3) Create a VI that takes a string from the user and reverses order of its characters. (e.g. takes This is a string. to .gnirts a si sihT). 4) Create a VI that tests uniformity of random number generator of LabVIEW. This program should create a random array that has 200 elements. Then should calculate variance and mean of this array. 5) Create a VI that generates a random array with 200 elements, however, distribution of its elements are not uniform (as in the previous question) but Gaussian. Draw a histogram to show its distribution is indeed a Gaussian.

You might also like