### MATLAB >> Simulink S-domain Transfer function to Z-domain Transfer function

Is there a block in simulink that can convert a transfer function in the s-domain to a transfer function in the z-domain?

If not, any recommendations on how to implement a simple solution?

### MATLAB >> Simulink S-domain Transfer function to Z-domain Transfer function

Assuming your transfer funtion is LTI (linear, time invariant) then there are functions within the Control Toolbox that will do the transformation for you.

If you don't have Controls Tbx then do a search for Tustin or Bilinear Transform and write some MATLAB code that does the conversion prior to running the simulation, and have a discrete transfer function block in your model use the results.
The transformation isn't difficult to implement.

Phil.

```I have a fourth-order IIR Z-domain transfer function in MATLAB, and I
am trying to obtain the factored form. I have used the 'factor'
command with no success. I am entering the function in as a symbolic
polynomial, I have pasted the code in below. Are there any suggestions
as to why the factor function returns a slightly simplified, but still
unfactored version of the expression?

z = sym('z');
symnom = (0.3901 + 0.6426*z^(-1) + 0.8721*z^(-2) + 0.6426*z^(-3) +
0.3901*z^(-4));
symden = (1 + 0.5038*z^(-1) + 0.8923*z^(-2) + 0.3844*z^(-3) +
0.1569*z^(-4))
polynom = [0.3901,0.6426,0.8721,0.6426,0.3901];
polyden = [1, 0.1569,0.3844,0.8923,0.5038,1];
Gsym = symnom/symden
factor(Gsym)
```

```Hi, i'm not able to get an the answer of a transfer function for any
(not step or impulse) signal only in m-file. Is it possible to feed
the TF with time and input signal to get the output without simulink?
I want to handle it only by progamming.

thanks
```

```Hi,

I have a transfer funciton where the numerator in the laplacian domain
contains "e to the power of s".

I tried putting exp([1 0]) and [exp(1) 0] in the numerator parameters
but neither worked out to be what I intended (exp^s) in the model.

If anyone can help I would really appreciate it.

Thanks,

```

```Hi,

how can i create a S -function block in simulink? I have the
following custom S function for example:

0.00034 s^2 - 0.000157 s - 5.016e-006
--------------------------------------------------------
0.3101 s^3 + 0.09604 s^2 + 0.003938 s + 1.665e-006

also, how can I convert this S -function transfer function to time
domain using matlab?

Thanks,
```