Chapter 5
Getting Started with Measurement Studio
©
National Instruments Corporation
5-19
Measurement Studio User Manual
[C#]
// Declare and initialize an instance of WhiteNoiseSignal.
WhiteNoiseSignal whiteNoise = new WhiteNoiseSignal();
// Store the generated data in a double array named data.
double[] data = whiteNoise.Generate(1000.0, 256);
// Use the PlotY method to plot the data.
graph.PlotY(data);
// Use the Mean method to calculate the mean of the data.
double mean = Statistics.Mean(data);
// Display the mean on the numeric edit.
numericedit.Value = mean;
// Display the mean on the gauge.
gauge.Value = mean;
Customizing your user interface
1.
Select the
Default.aspx
tab to return to the Web Forms Designer.
2.
Right-click the legend and select
Edit Items
to display the LegendItem
Collection Editor dialog box. You use the LegendItem Collection
Editor dialog box to add or remove legend items and to configure
legend item properties.