matlab中找不到step函数
如题,在commandwindow输入step函数,给出“Undefinedfunction'step'forinputargumentsoftype'double'.”...
如题,在command window输入step函数,给出“Undefined function 'step' for input arguments of type 'double'.”
是我的matlab没有安装完全吗? 用的是2012b版本 展开
是我的matlab没有安装完全吗? 用的是2012b版本 展开
1个回答
展开全部
在命令行输入help step即可。
如下所示,可以 看到函数step的用法。
>> help step
STEP Step response of dynamic systems.
STEP(SYS) plots the step response of the dynamic system SYS. For
multi-input models, independent step commands are applied to each
input channel. The time range and number of points are chosen
automatically.
STEP(SYS,TFINAL) simulates the step response from t=0 to the
final time t=TFINAL. For discrete-time models with unspecified
sampling time, TFINAL is interpreted as the number of samples.
STEP(SYS,T) uses the user-supplied time vector T for simulation.
For discrete-time models, T should be of the form Ti:Ts:Tf
where Ts is the sample time. For continuous-time models,
T should be of the form Ti:dt:Tf where dt will become the sample
time for the discrete approximation to the continuous system. The
step input is always assumed to start at t=0 (regardless of Ti).
STEP(SYS1,SYS2,...,T) plots the step response of several systems
SYS1,SYS2,... on a single plot. The time vector T is optional. You
can also specify a color, line style, and marker for each system, for
example:
step(sys1,'r',sys2,'y--',sys3,'gx').
[Y,T] = STEP(SYS) returns the output response Y and the time vector T
used for simulation. No plot is drawn on the screen. If SYS has NY
outputs and NU inputs, and LT = length(T), Y is an array of size
[LT NY NU] where Y(:,:,j) gives the step response of the j-th input
channel.
[Y,T,X] = STEP(SYS) also returns, for a state-space model SYS, the
state trajectory X, a LT-by-NX-by-NU array if SYS has NX states.
See STEPPLOT for additional graphical options for step response plots.
See also stepplot, impulse, initial, lsim, ltiview, DynamicSystem.
Overloaded methods:
DynamicSystem/step
uss/step
idmodel/step
idfrd/step
iddata/step
idnlmodel/step
Reference page in Help browser
doc control/step
如下所示,可以 看到函数step的用法。
>> help step
STEP Step response of dynamic systems.
STEP(SYS) plots the step response of the dynamic system SYS. For
multi-input models, independent step commands are applied to each
input channel. The time range and number of points are chosen
automatically.
STEP(SYS,TFINAL) simulates the step response from t=0 to the
final time t=TFINAL. For discrete-time models with unspecified
sampling time, TFINAL is interpreted as the number of samples.
STEP(SYS,T) uses the user-supplied time vector T for simulation.
For discrete-time models, T should be of the form Ti:Ts:Tf
where Ts is the sample time. For continuous-time models,
T should be of the form Ti:dt:Tf where dt will become the sample
time for the discrete approximation to the continuous system. The
step input is always assumed to start at t=0 (regardless of Ti).
STEP(SYS1,SYS2,...,T) plots the step response of several systems
SYS1,SYS2,... on a single plot. The time vector T is optional. You
can also specify a color, line style, and marker for each system, for
example:
step(sys1,'r',sys2,'y--',sys3,'gx').
[Y,T] = STEP(SYS) returns the output response Y and the time vector T
used for simulation. No plot is drawn on the screen. If SYS has NY
outputs and NU inputs, and LT = length(T), Y is an array of size
[LT NY NU] where Y(:,:,j) gives the step response of the j-th input
channel.
[Y,T,X] = STEP(SYS) also returns, for a state-space model SYS, the
state trajectory X, a LT-by-NX-by-NU array if SYS has NX states.
See STEPPLOT for additional graphical options for step response plots.
See also stepplot, impulse, initial, lsim, ltiview, DynamicSystem.
Overloaded methods:
DynamicSystem/step
uss/step
idmodel/step
idfrd/step
iddata/step
idnlmodel/step
Reference page in Help browser
doc control/step
追问
我用了最简答的语句 t=0:0.01:10; num=1;den=[1,2,1]; y=step(num,den,t);
但提示没有定义相应的函数,用help step确实能找到step的说明。这是咋回事呢?求教啊
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询