jatbakar
2005-01-19 02:07:39 UTC
hello all, I am new to this group and and a beginner to Scilab. I am
doing a project translating a Matlab program to Scilab.
I'm having trouble dealing with the tf2ss function. I am not able to
get the same results for the same transfer function in Scilab as I do
in Matlab. Would appreciate if anyone can help me or spot any mistakes
I have made.
MATLAB code
% for transfer function (2s+1)/(s^2 +4s +4)
[A,B,C,D]= tf2ss([0 2 1], [1 4 4])
A=[-4 -4; 1 0] B=[1;0] C=[2 1] D=0
SCILAB
num=poly([1 2 0], 's', 'c');
den =poly([4 4 1],'s','c');
H=num/den;
tf2ss(H)
A=[-4.4 -1.8; 3.2 0.4] B=[-1.55; 0.77] C=[-1.29 -0] D=0
Once again thanks
doing a project translating a Matlab program to Scilab.
I'm having trouble dealing with the tf2ss function. I am not able to
get the same results for the same transfer function in Scilab as I do
in Matlab. Would appreciate if anyone can help me or spot any mistakes
I have made.
MATLAB code
% for transfer function (2s+1)/(s^2 +4s +4)
[A,B,C,D]= tf2ss([0 2 1], [1 4 4])
A=[-4 -4; 1 0] B=[1;0] C=[2 1] D=0
SCILAB
num=poly([1 2 0], 's', 'c');
den =poly([4 4 1],'s','c');
H=num/den;
tf2ss(H)
A=[-4.4 -1.8; 3.2 0.4] B=[-1.55; 0.77] C=[-1.29 -0] D=0
Once again thanks