| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → RF Toolbox |
| Contents | Index |
| Learn more about RF Toolbox |
[y,t] = timeresp(h,u,ts)
[y,t] = timeresp(h,u,ts) computes the output signal, y, that the rfmodel object, h, produces in response to the given input signal, u.
The input h is the handle of a model object. ts is a positive scalar value that specifies the sample time of the input signal.
The output y is the output signal. RF Toolbox software computes the value of the signal at the time samples in the vector t using the following equation.
![]()
where

and A, C, D, and Delay are properties of the rfmodel.rational object, h.
The following example shows you how to compute the time response of the data stored in the file default.s2p by fitting a rational function model to the data and using the timeresp method to compute the time response of the model.
% Define the input signal
SampleTime = 2e-11;
OverSamplingFactor = 25;
TotalSampleNumber = 2^12;
InputTime = double((1:TotalSampleNumber)')*SampleTime;
InputSignal = sign(randn(1, ...
ceil(TotalSampleNumber/OverSamplingFactor)));
InputSignal = repmat(InputSignal, [OverSamplingFactor, 1]);
InputSignal = InputSignal(:);
% Create a rational function model
orig_data=read(rfdata.data,'default.s2p');
freq=orig_data.Freq;
data=orig_data.S_Parameters(2,1,:);
fit_data=rationalfit(freq,data);
% Compute the time response
[y,t]=timeresp(fit_data,InputSignal,SampleTime);
| freqresp |
| rationalfit |
| rfmodel.rational |
| writeva |
![]() | smith | write | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |