<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="None">
  <name>Additional Exercises for Arrays</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2004/06/22 11:23:07 GMT-5</md:created>
  <md:revised>2004/07/19 08:46:59.331 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="mshiralkar05">
      <md:firstname>Malan</md:firstname>
      
      <md:surname>Shiralkar</md:surname>
      <md:email>mshiralkar05@hotmail.com</md:email>
    </md:maintainer>
    <md:maintainer id="harika">
      <md:firstname>Harika</md:firstname>
      
      <md:surname>Basana</md:surname>
      <md:email>ilsai@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="NationalInstruments">
      <md:firstname>National</md:firstname>
      
      <md:surname>Instruments</md:surname>
      <md:email>certification@ni.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>National Instruments</md:keyword>
    <md:keyword>LabVIEW</md:keyword>
    <md:keyword>exercise</md:keyword>
    <md:keyword>arrays</md:keyword>
  </md:keywordlist>

  <md:abstract/>
</metadata>
  
  <content>
    <exercise id="exercise1">
      <problem>
	<para id="para1">
	  Build a VI that reverses the order of an array that contains
	  <m:math>
	    <m:cn>100</m:cn>
	  </m:math>
	  random numbers. For example,
	  array[<m:math><m:cn>0</m:cn></m:math>] becomes
	  array[<m:math><m:cn>99</m:cn></m:math>],
	  array[<m:math><m:cn>1</m:cn></m:math>] becomes
	  array[<m:math><m:cn>98</m:cn></m:math>], and so on.
	</para>
	<note type="tip">
	  Use the <code>Reverse 1D Array</code> function located on
	  the <code>Functions&gt;&gt;All Functions&gt;&gt;Array</code> palette
	  to reverse the array order.
	</note>
	<para id="para2">
	  Save the VI as <code>Reverse Random Array.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="exercise2">
      <problem>
	<para id="para3">
	  Build a VI that accumulates an array of temperature values
	  using the <cnxn document="m12209">Thermometer</cnxn> VI. Set the
	  array size with a control on the front panel. Initialize an
	  array using the <code>Initialize Array</code> function of
	  the same size where all the values are equal to
	  <m:math><m:cn>10</m:cn></m:math>. Add the two arrays,
	  calculate the size of the final array, and extract the
	  middle value from the final array. Display the
	  <code>Temperature Array</code>, <code>Initialized
	  Array</code>, <code>Final Array</code>, and <code>Mid
	  Value</code>.
	</para>
	<para id="para4">
	  Save the VI as <code>Find Mid Value.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="exercise3">
      <problem>
	<para id="para5">
	  Build a VI that generates a 2D array of three rows by
	  <m:math><m:cn>10</m:cn></m:math> columns that
	  contains random numbers. After generating the array, index
	  each row, and plot each row on its own graph. The front
	  panel should contain three graphs.
	</para>
	<para id="para6">
	  Save the VI as <code>Extract 2D Array.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="exercise4">
      <problem>
	<para id="para7">
	  Build a VI that simulates the roll of a die with possible
	  values <m:math><m:cn>1</m:cn></m:math> through
	  <m:math><m:cn>6</m:cn></m:math> and records the number of
	  times that the die rolls each value. The input is the
	  number of times to roll the die, and the outputs include
	  the number of times the die falls on each possible
	  value. Use only one <code>shift register</code>.
	</para>
	<para id="para8">
	  Save the VI as <code>Die Roller.vi</code> in the
	  <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
    <exercise id="exercise5">
      <problem>
	<para id="para9">
	  Build a VI that generates a 1D array and then multiplies
	  pairs of elements together, starting with elements
	  <m:math><m:cn>0</m:cn></m:math> and
	  <m:math><m:cn>1</m:cn></m:math>, and returns the resulting
	  array. For example, the input array with values
	  <m:math>
	    <m:set>
	      <m:cn>1</m:cn>
	      <m:cn>23</m:cn>
	      <m:cn>10</m:cn>
	      <m:cn>5</m:cn>
	      <m:cn>7</m:cn>
	      <m:cn>11</m:cn>
	    </m:set>
	  </m:math> results in the output array
	  <m:math>
	    <m:set>
	      <m:cn>23</m:cn>
	      <m:cn>50</m:cn>
	      <m:cn>77</m:cn>
	    </m:set>
	  </m:math>.	  
	</para>
	<note type="tip">
	  Use the <code>Decimate 1D Array</code> function located on
	  the <code>Functions&gt;&gt;All Functions&gt;&gt;Array</code> palette.
	</note>
	<para id="para10">
	  Save the VI as <code>Array Pair Multiplier.vi</code> in
	  the <code>C:\Exercises\LabVIEW Basics I</code> directory.
	</para>
      </problem>
    </exercise>
  </content>
</document>
