Rank: Advanced Member Groups: Registered
Joined: 20/04/2010(UTC) Posts: 33
|
I know I did post here but I don't know what I did, it never showed up... Searching the forums didn't reveal anything, so here is my big list: complex roots. For example, I could implement a Bessel polynomial very easy, "expand" for a 4th order resulted in this: Code:105+s*(105+s*(45+s*(10+s)))
which doesn't bother me, but I'm interested in finding the roots for a transfer function with variable order (Bessel filter). The wiki page also says "solve" only works for real numbers. I could try Bairstow's method, but that would complicate things a bit. I'll do it, though tomorrow, now my eyes are fighting the light... So, if time allows and interest fuels, could you consider a future function similar to Maxima's "allroots"? Regards, Vlad.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Vlad, As far as I know, you can get all the roots of a polynomial by "polyroots" function p←105+105*x+45*x^2+10*x^3+1polyroots(mat(105;105;45;10;1;5;1))=mat(-2,8962+0,8672*i;-2,8962-0,8672*i;-2,1038+2,6574*i;-2,1038-2,6574*i;4;1)You need the polynomial coefficients here. I think that SMath, at the moment, does not have the ability to extract coefficients from a polynomial expression or to expand it in order to get the polynomial (not sure). Regards, Radovan Edited by user 22 April 2010 13:17:15(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/04/2010(UTC) Posts: 33
|
Thank you for the solution! With a little work I can get the terms of the polynomial by recursion and then use polyroots. I'm working on it now. Happy regards, Vlad.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
You are welcome I hope you would not mind sharing your SMath files with us or adding them to the Examples on the Wiki, when you get them ready. Regards, Radovan Edited by user 22 April 2010 17:52:00(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
omorr wrote:I think that SMath, at the moment, does not have the ability to extract coefficients from a polynomial expression or to expand it in order to get the polynomial (not sure). You are right.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/04/2010(UTC) Posts: 33
|
Of course I will, I meant to say it but I didn't know how it will end up, so I chose safety first This is the basis, a crude version. a(n) was a left-over from the previous version, now reused. Lots of room for improvement. Since this is for calculating a Bessel filter, H(s) is made just to see how the transfer function would look like, a feast of the success for the eyes, if you want Next steps are printing real and imaginary parts of the poles and converting them to parameters for LTspice. Then transformations from low-pass (these ones) to high-pass, band-pass and band-reject. Then Butterworth, Chebyshev type I and II and Cauer. All these are assisting me in making a universal filter; it will be ready (it is half-ready now) on LTspice Yahoo groups. The files already exist in wxMaxima, about 90% finished, but with SMath... it's a pleasure irol: I'm not working all of the time, but when they are ready I'll post them here. Regards, Vlad.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Thank you, the contribution to Wiki will be very welcome BTW if I understood you well - you are using Ubuntu, are'nt you? This screenshot is very interesting. I think I've never seen the screenshot like this one. I suppose you've chosen some Custom background color for regions (near white - some grayish). If you define background color as white from the Basic colors palette, the regions will be transparent (at least on my computer). Is there any option in the "Interface" I am not aware of, or something else? Maybe Ubuntu? Regards, Radovan EDIT: Sorry, it seems I was wrong. Regions are not white. Edited by user 22 April 2010 19:55:59(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/04/2010(UTC) Posts: 33
|
(255 251 240) is the color, it's not that much but it lessens the contrast a bit. Maybe in a future version there will be an option to set the whole background color? Ah, wishes, wishes... One at a time. Regards, Vlad. [EDIT] I forgot, Ubuntu Karmic, yes [/EDIT]
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.