<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from tfe.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="tfe" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>tfe</refname>
    <refpurpose>Estimate transfer function of system with input "x" and output "y".</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   [Pxx,freq] = tfe(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Description</title>
   <para>
Estimate transfer function of system with input "x" and output "y".
Use the Welch (1967) periodogram/FFT method.
Compatible with Matlab R11 tfe and earlier.
See "help pwelch" for description of arguments, hints and references — especially hint (7) for Matlab R11 defaults.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Estimate the transfer function of a system using tfe

// Define input and output signals
x = sin(2 * %pi * (0:0.01:10)); // Input signal (sine wave)
y = 0.5 * x + 0.1 * rand(1, length(x)); // Output signal (scaled and noisy)

// Define parameters
Nfft = 256; // Number of FFT points
Fs = 100; // Sampling frequency
window = hamming(128); // Hamming window
overlap = 64; // Overlap between segments
range = 'onesided'; // Frequency range
plot_type = 'trans'; // Plot type
detrend = 'none'; // No detrending

// Estimate the transfer function
[Pxx, freq] = tfe(x, y, Nfft, Fs, window, overlap, range, plot_type, detrend);

// Display the results
disp("Transfer function estimate:");
disp(Pxx);
disp("Frequency vector:");
disp(freq);

   ]]></programlisting>
</refsection>

<refsection role="see also">
   <title>See also</title>
   <simplelist type="inline">
   <member><link linkend="pwelch">pwelch</link></member>
   </simplelist>
</refsection>
</refentry>
