<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hello,<BR> <BR>With Scilab, I know of two ways of converting from a continuous time transfer function (e.g. 1/s) to a discrete time transfer funtion:<BR><span style="color: rgb(0, 0, 0);"></span> <BR><span style="color: rgb(0, 0, 0);">1st way:</span><BR><span style="color: rgb(0, 0, 0);">s</span><span style="color: rgb(92, 92, 92);">=</span><span style="color: rgb(50, 185, 185);">poly</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(188, 143, 143);">0</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(188, 143, 143);">s</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(74, 85, 219);">)</span><BR><span style="color: rgb(174, 92, 176); text-decoration: underline;">ss2tf</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(174, 92, 176); text-decoration: underline;">cls2dls</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(174, 92, 176); text-decoration: underline;">tf2ss</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(174, 92, 176); text-decoration: underline;">syslin</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(188, 143, 143);">c</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(188, 143, 143);">1</span><span style="color: rgb(92, 92, 92);">/</span><span style="color: rgb(0, 0, 0);">s</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(188, 143, 143);">0.1</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(74, 85, 219);">)</span>
<BR> <BR>This way requires a lot of typing.<BR><span style="color: rgb(0, 0, 0);"></span> <BR><span style="color: rgb(0, 0, 0);">2nd Way:</span><BR><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">s</span><span style="color: rgb(92, 92, 92);">=</span><span style="color: rgb(50, 185, 185);">poly</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(188, 143, 143);">0</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(188, 143, 143);">s</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 0, 0);">z</span><span style="color: rgb(92, 92, 92);">=</span><span style="color: rgb(50, 185, 185);">poly</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(188, 143, 143);">0</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(188, 143, 143);">z</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(0, 0, 0);">;</span></span><BR><span style="color: rgb(0, 0, 0);">sl</span><span style="color: rgb(92, 92, 92);">=</span><span style="color: rgb(174, 92, 176); text-decoration: underline;">syslin</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(188, 143, 143);">c</span><span style="color: rgb(188, 143, 143);">'</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(188, 143, 143);">1</span><span style="color: rgb(92, 92, 92);">/</span><span style="color: rgb(0, 0, 0);">s</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(0, 0, 0);">;</span>
<span style="color: rgb(0, 0, 0);"></span><BR><span style="color: rgb(0, 0, 0);">sl2</span><span style="color: rgb(92, 92, 92);">=</span><span style="color: rgb(174, 92, 176); text-decoration: underline;">horner</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(0, 0, 0);">sl</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(188, 143, 143);">2</span><span style="color: rgb(92, 92, 92);">/</span><span style="color: rgb(188, 143, 143);">0.1</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(92, 92, 92);">*</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(0, 0, 0);">z</span><span style="color: rgb(92, 92, 92);">-</span><span style="color: rgb(188, 143, 143);">1</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(92, 92, 92);">/</span><span style="color: rgb(74, 85, 219);">(</span><span style="color: rgb(0, 0, 0);">z</span><span style="color: rgb(92, 92, 92);">+</span><span style="color: rgb(188, 143, 143);">1</span><span style="color: rgb(74, 85, 219);">)</span><span style="color: rgb(74, 85, 219);">)</span><BR> <BR>This way requires me to remember the tustin approximation.<BR> <BR>Does matlab have anything like Matlab's c2d function?<BR><br>Stephen<BR> </div></body>
</html>