📄 initiald.m
字号:
function [T,V]=initiald(tf,x0,initfun,a0,a1,b,c,d,delay,F,tol);
%INITIALD Initial condition response of continuous-time linear systems
% with delays.
% INITIALD simulates the linear time-delay system
% .
% x(t) = A0*x(t)+A1*y(-delay)+int(-delay,0,F(s)*y(s))ds+B*u(t)
% v(t) = C*x(t) + D*u(t)
%
% on the segment [0, tf], with the initial conditions
% x(0)=[0], x(t)=[0], when t<0,
% where [0] -- column-vector of zeros,
% due to an initial condition on the states.
% It's equivalent to the system
% .
% x(t) = A0*x(t)+A1*y(-delay)+int(-delay,0,F(s)*y(s))ds
% v(t) = C*x(t)
%
% with the initial state x(0)=x0 and the initial function
% x(t), given by parameter initfun.
%
% The time vector is automatically determined.
%
% When invoked with left hand arguments,
% [T,V]=initiald(tf,x0,initfun,a0,a1,b,c,d,delay);
% [T,V]=initiald(tf,x0,initfun,a0,a1,b,c,d,delay,F);
% [T,V]=initiald(tf,x0,initfun,a0,a1,b,c,d,delay,F,tol);
% returns the time history in the vector T and the output in
% the matrix V. No plot is drawn on the screen. V has as many
% columns as there are outputs and length(T) rows.
%
% Invoked without left hand arguments INITIALD produces the graph.
%
% See also: STEPD, IMPULSED, INPUTD.
% Check the input parameters
if tf < 0
error('The first argument must be positive.');
end;
error(a0a1bcd(a0,a1,b,c,d));
% Compute the time vector and the corresponding state values
if nargin==9
[tout,xout]=dde45l1(0,tf,x0,initfun,delay,a0,a1,...
zeros(length(x0),1));
end;
if nargin==10
[tout,xout]=dde45l1(0,tf,x0,initfun,delay,a0,a1,...
zeros(length(x0),1),delay,F);
end;
if nargin==11
[tout,xout]=dde45l1(0,tf,x0,initfun,delay,a0,a1,...
zeros(length(x0),1),delay,F,tol);
end;
% Compute the output
vout=xout*c';
if nargout==0 % If no output arguments, plot graph
plot(tout,vout)
xlabel('Time (secs), t'), ylabel('Amplitude, v(t)')
return % Suppress output
end
T=tout;
V=vout;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -