MATLAB BUILDER EX 1 Guía de usuario Pagina 61

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 164
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 60
Spectral Analysis Example
'Cancel button click event handler. Exits form without computing fft
'or updating variables.
Unload Me
End Sub
Private Sub btnOK_Click()
'OK button click event handler. Updates state of all variables from controls
'and executes the computefft or plotfft method.
Dim R As Range
If theFourier Is Nothing Or theFFTData Is Nothing Then GoTo Exit_Form
On Error Resume Next
'Process inputs
SetR=Range(refedtInput.Text)
If Err <> 0 Then
MsgBox ("Invalid range entered for Input Data")
Exit Sub
End If
Set InputData = R
Interval = CDbl(edtSample.Text)
If Err <> 0 Or Interval <= 0 Then
MsgBox ("Sampling interval must be greater than zero")
Exit Sub
End If
'Process Outputs
SetR=Range(refedtFreq.Text)
If Err = 0 Then
Set Frequency = R
End If
SetR=Range(refedtReal.Text)
If Err = 0 Then
theFFTData.Real = R
End If
SetR=Range(refedtImag.Text)
If Err = 0 Then
theFFTData.Imag = R
End If
SetR=Range(refedtPowSpect.Text)
If Err = 0 Then
Set PowerSpect = R
End If
3-23
Vista de pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 163 164

Comentarios a estos manuales

Sin comentarios