Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline tomtit  
#1 Posted : 20 March 2017 22:40:31(UTC)
tomtit


Rank: Advanced Member

Groups: Registered
Joined: 22/02/2014(UTC)
Posts: 51

Was thanked: 6 time(s) in 5 post(s)
Once again, Smath of the newest version is not compatible with the older one.
Attached, is a worksheet to design a special case of elliptic low pass filter.
It was written a year ago and it works fine in 5973, but doesn't work in 6179.
The vectorization of H(s) failed.
I still need to keep 5973 for quite a number of old worksheets.

EQMF.sm (29kb) downloaded 11 time(s).

Edited by user 20 March 2017 22:43:55(UTC)  | Reason: Not specified

Offline Davide Carpi  
#2 Posted : 21 March 2017 02:36:24(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,648
Man
Italy
Location: Italy

Was thanked: 854 time(s) in 566 post(s)
At first glance, probably some bugs, not sure if all about vectorize() itself; I can make it working (see screenshot below), but needs further investigations.

2017-03-21 00_30_56-SMath Studio - [EQMF.sm_].png

Edited by user 11 April 2017 13:29:24(UTC)  | Reason: added to BTS

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 21/03/2017(UTC)
Offline tomtit  
#3 Posted : 21 March 2017 17:11:51(UTC)
tomtit


Rank: Advanced Member

Groups: Registered
Joined: 22/02/2014(UTC)
Posts: 51

Was thanked: 6 time(s) in 5 post(s)
Thank you Davide,

What is bothering me - there is no much logic behind the kluge.
P.S.
Another difference between 6179 and 5973 is:
In 5973 we can put almost any operator into a matrix o vector.
Sometimes I did it to fit the code it in lesser number of lines (like in old Mathcad).
But if I put "for()" into the matrix, 5379 accepts that, but 6179 reports error "no result".
It looks like 6179 expect some calculated result for each element of the matrix.
But in this case the matrix is just a placeholder for operators, we don't need any value there.

Regards,
Igor

Edited by user 21 March 2017 17:13:39(UTC)  | Reason: Not specified

Offline Jean Giraud  
#4 Posted : 21 March 2017 18:13:22(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 1,613
Canada

Was thanked: 450 time(s) in 343 post(s)
Hello Igor,

You have several interesting points about including operators in matrix.
Can you post what you have not working 6179 ... doctors are waiting.

Those "Filters" are monkey business to me [not my cup of tea].
The attached Butterworth works fine.

1. Smath does not have the 'range variable iterated product'... it works otherwise.
2. Iterated product as well as summation needs be "local definition".
3. Vectorise operator does an extraordinary good job. Most likely about this
operator: it will never be exhausted ... Mathcad 11 was never exhausted.
Almost each case is specific.

The elliptic filter would take ~ ½ day to code from Mathcad 11.

Jean

Maths Butterworth.sm (29kb) downloaded 9 time(s).
Offline tomtit  
#5 Posted : 21 March 2017 19:00:31(UTC)
tomtit


Rank: Advanced Member

Groups: Registered
Joined: 22/02/2014(UTC)
Posts: 51

Was thanked: 6 time(s) in 5 post(s)
Hello Jean,

I'm just a hardware developer playing with circuit theory.
Elliptic filters are an example of efficient way to synthesise
transfer functions for the feedback loops of extremely high loopgain.

But let us get back to the "for()" in the matrix.
See the code in attachment. This is an example of SVD algorithm.
Find the comment ">- LOOK AT THE TRICK !-->" in the matrix.
This code works with 5973, but 6179 reports an error "There is no result".

Regards
svdt.sm (64kb) downloaded 11 time(s).

Edited by user 21 March 2017 19:02:20(UTC)  | Reason: Not specified

Offline uni  
#6 Posted : 21 March 2017 19:54:17(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 667
Man
Russian Federation

Was thanked: 513 time(s) in 333 post(s)
Especially for large numerical calculations I created Script plugin. The script is compiled into the library and then executed. If I find the time, I'll show something from digital signal processing (including images).
Russia forever!
Viacheslav N. Mezentsev
Offline MarB  
#7 Posted : 21 March 2017 21:31:01(UTC)
MarB

Rank: Newbie

Groups: Registered
Joined: 21/10/2016(UTC)
Posts: 8

Originally Posted by: tomtit Go to Quoted Post
Hello Jean,
But let us get back to the "for()" in the matrix.
...
This code works with 5973, but 6179 reports an error "There is no result".


If you provide a result, it works. With the cost of an extra line.
for_in_matrix.PNG
Offline Jean Giraud  
#8 Posted : 22 March 2017 04:14:01(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 1,613
Canada

Was thanked: 450 time(s) in 343 post(s)
Sorry collabs [Igor, Mark],

All that stuff is above my head !

Attached as well "eigenAll Companion", adapted from G Urroz.

Jean

Matrix SVD [Igor].sm (76kb) downloaded 7 time(s).

eigenAll Companion.sm (50kb) downloaded 7 time(s).
Users browsing this topic
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.