How write actionscript math?

Hello…

I have problem about math.
I want plot graph of eq.
… …

Gc=[kds^2 +kps+Ki]/[s^3 +(10+kd)*s^2 +(20+Kp)*s+Ki]
… …

how i write code(actionscript) in flash
when Kp Ki Pd is user input.
and S is Laplace transform
This code plot with Matlab

Kp=300;//user input
Ki=0;//user input
Kd=0;//user input

num=[Kd Kp Ki];//kds^2+Kps+Ki
den=[1 10+Kd 20+Kp Ki];//s^3+(10+Kd)*s^2+(20+Kp)*s+Ki

t=0:0.01:2;//t=0 and add value 0.01 to 2
step(num,den,t)//step is plot unit step


graph of matlab


this code flash,but it don’t works

this.createEmptyMovieClip(“graph_mc”,this.getNextH ighestDepth());
graph_mc.moveTo(50,200);
graph_mc.lineStyle(2,0xff0000);
var Ki:Number = ?;//user input
var Kp:Number = ?;//user input
var Kd:Number = ?;//user input

var t:Number = 0;
var Fs=KdMath.pow(s,2)+(Kps)+Ki;
var Gc=Math.pow(s,3)+(10+Kd)*Math.pow(s,2)+(20+Kp)*s+K i;
var Gs=Fs/Gc;

this.onEnterFrame=function(){
if(t<2){
graph_mc.lineTo(200+t,Gs);
t = t + 0.01;
}
}

help me,please:crying:
Thanks you…