MATLAB BUILDER EX 1 Guide de l'utilisateur Page 61

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 164
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 163 164

Commentaires sur ces manuels

Pas de commentaire