So I've been tweaking a very simple code to plot a few functions in MATLAB using the step and tf functions coupled with the laplace and ilaplace to generate a few graphs. I first wanted to generate an ideal step response for a few inputs in the form of a transfer function, then move on to more realistic estimates using a form of the Boltzmann Sigmoid eqn, assuming several constant values. I've included the full code below for reference.

`%%Ideal Unit Step Response %%`

w0 = 1; %rad/s%

zeta = 0.15; %damping ratio%

wn = (w0)/((1-(zeta^2))^(1/2));R = 1;num = (wn^2);den = [1 (2*zeta*wn) (wn^2)];Ideal = tf(num,den);t=0:0.1:30;step(R*Ideal,t);axis([0 30 0 2]);stepinfo(Ideal)%%Boltzmann Sigmoid Function (time domain method) %%

a = 0;b = 1;c = 6;T = 0.1;s = a+b/(1+exp(c*(T-1)));% sym('Ideal');

h = ilaplace(Ideal);y = conv(s,h);%%Boltzmann Sigmoid Function (s-domain method) %%

S = laplace(s);Y = S*Ideal;y = ilaplace(Y);

The Ideal step response runs fine, but the time domain method using the approximation function stumps with

` "Undefined function 'ilaplace' for input arguments of type 'tf'."`

Similarly, the S domain method yields a

`"Undefined function 'laplace' for input arguments of type'double'."`

Is there any insight as to what may cause these issues? I thought maybe the code didn't like solving both a TF and an ilaplace at the same time, so I used the 'sym' function, but it seemed to not work. :/

## Best Answer