I used a Simulink PD model and used values:

`P=100; D=10; N=100`

The input I am giving is

`[0;0;0]-[0.05*(10-t);0.04*(10-t);0.03*(10-t)] where t=1:10`

I get numeric values from the simulation.

I am trying to implement the same in script file but I get answer in transfer function format. I want the answer to be in numeric form like that from Simulink, Here is my MATLab code:

`for t = 1:10T_d = [0;0;0];T_o = [0.05*(10-t);0.04*(10-t);0.03*(10-t)];T_e = T_d-T_o;C = pid(100,0,10,100)T_u=T_e*Cend`

Kindly help me in this regard.

## Best Answer