Home Forums SYSTEM Frequency values from Time values

Viewing 0 reply threads
  • Author
    Posts
    • #15997
      Abdallah Ismail
      Participant

      If I’m using FFT in matlab with optisystem.
      Does this code accurate for “f” to get the frequency values that correspond to time values:

      tau = InputPort1.Sampled.Time;
      N = length (tau)
      dtau = tau (2)- tau(1);
      fs = 1/(dtau*N);
      fc = InputPort1.Sampled.CentralFrequency;
      fmax = fc + (fs* N/2);
      fmin = fc – (fs* N/2);
      f = (fmin:fs:fmax-fs);

Viewing 0 reply threads
  • You must be logged in to reply to this topic.