National Instruments 370760B-01 Calculator User Manual


 
366 Chapter 6. Function Reference
necessary. If intstep is not specified the integration stepsize is determined from the
system eigenvalues and the minimum spacing in the input signal, u.
A zero or first order discrete equivalent of the systems can be specified. The standard
Xmath * operator uses only a zero order discretization. The first order simulation
actually uses a triangle hold equivalent. This is equivalent to connecting the samples
going into the hold function. Although the continuous time hold is noncausal the
discrete state-space system is causal. This is often more accurate at higher frequencies.
Examples
# We will use trsp to simulate the output of
# a second order system for various inputs
P = 400/makepoly([1,10,400],"s")
time = [0:0.25:2]
u = gstep(time,time,[0,1,0,-1,0,1,0,-1,0])
# Examine the standard Xmath simulation
y = P*u
gph1 = ctrlplot(y);
gph1 = plot(u,gph1,{marker=1,line=0,legend=["output";"input"]})?