%% MIMO Frequency-Response Functions
% Compute the frequency-response functions for a two-input/two-output system excited by random noise.
%
% Load a data file that contains Xrand, the input excitation signal, and Yrand, the system response. Compute the frequency-response functions using a 5000-sample Hann window and 50% overlap between adjoining data segments. Specify that the output measurements are displacements.

load modaldata
winlen = 5000;

frf = modalfrf(Xrand,Yrand,fs,hann(winlen),0.5*winlen,'Sensor','dis');

% Use the plotting functionality of modalfrf to visualize the responses.

modalfrf(Xrand,Yrand,fs,hann(winlen),0.5*winlen,'Sensor','dis')

% Copyright 2012 The MathWorks, Inc.