# [Scilab-users] simp_mode odesn't seem to work

2 messages
Open this post in threaded view
|

## [Scilab-users] simp_mode odesn't seem to work

Dear All,

I need to have examples of rationals with very close poles and zeros, but the simp engine simplifies them. This is awkward, since the simp documentation says there is no threshold, so other than identical poles and zeros shouldn't be simplified. Actually this is the case with complicated rationals created from electrical network analysis of some filters, but not with the more transparent example below.

My second attempt to reproduce the problem in my simple numeric example has been to use the command simp_mode to disable any simplification. But it doesn't work as expected--and described. For instance
, the code

N
= poly([1 2 3 3.000009 5], "s")
D
= poly([1.0000001 3.0000003 4 6], "s")
simp_mode
= %f;
H
= N/D

yields these results:

--> N
N  =
-90.00027 +213.00055s -184.00037s² +74.000099s³ -14.000009s⁴ +s⁵
--> D
D  =
72.000014 -126.00002s +67.000005s² -14s³ +s⁴
--> H
H  =

-30.000093 +31.000066s -10.00001s² +s³
--------------------------------------
24.000006 -10.000001s +s²

As can be seen, even if I disabled automatic simplification, the result is not the raw quotient N/D but a "simplified" version.

Any idea? Is it a bug?

Regards,

Federico Miyara

 Libre de virus. www.avast.com

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: simp_mode odesn't seem to work

Hello Federico,

simp_mode is a function not a variable,
use :
simp_mode(%f);

Regards,
Antoine

Le 27/08/2020 à 09:50, Federico Miyara a écrit :

Dear All,

I need to have examples of rationals with very close poles and zeros, but the simp engine simplifies them. This is awkward, since the simp documentation says there is no threshold, so other than identical poles and zeros shouldn't be simplified. Actually this is the case with complicated rationals created from electrical network analysis of some filters, but not with the more transparent example below.

My second attempt to reproduce the problem in my simple numeric example has been to use the command simp_mode to disable any simplification. But it doesn't work as expected--and described. For instance
, the code

N
= poly([1 2 3 3.000009 5], "s")
D
= poly([1.0000001 3.0000003 4 6], "s")
simp_mode
= %f;
H
= N/D

yields these results:

--> N
N  =
-90.00027 +213.00055s -184.00037s² +74.000099s³ -14.000009s⁴ +s⁵
--> D
D  =
72.000014 -126.00002s +67.000005s² -14s³ +s⁴
--> H
H  =

-30.000093 +31.000066s -10.00001s² +s³
--------------------------------------
24.000006 -10.000001s +s²

As can be seen, even if I disabled automatic simplification, the result is not the raw quotient N/D but a "simplified" version.

Any idea? Is it a bug?

Regards,

Federico Miyara

 Libre de virus. www.avast.com

```_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
```

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users