National Instruments 374318A-01 用户手册

下载
页码 109
Chapter 4
Getting Started with Measurement Studio
© National Instruments Corporation
4-43
[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.
Plot.PlotY(data);
    
// Use the Mean method to calculate the mean of the data.
double mean = Statistics.Mean(data);
        
// 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 to add or remove legend items and to configure legend item 
properties.