[SS-2440] Vectorize() works differently in 6179

[SS-2440] Vectorize() works differently in 6179 - Feature/Bug ? - Messages

#1 Posted: 3/20/2017 4:40:31 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

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 (28 KiB) downloaded 76 time(s).
#2 Posted: 3/20/2017 8:36:24 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

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
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Igor Skarine 3/21/2017 10:56:00 AM
#3 Posted: 3/21/2017 11:11:51 AM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

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
#4 Posted: 3/21/2017 12:13:22 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

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 (28 KiB) downloaded 74 time(s).
#5 Posted: 3/21/2017 1:00:31 PM
Igor Skarine

Igor Skarine

14 likes in 97 posts.

Group: User

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 (63 KiB) downloaded 75 time(s).
#6 Posted: 3/21/2017 1:54:17 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

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
#7 Posted: 3/21/2017 3:31:01 PM
Martin_B

Martin_B

21 likes in 84 posts.

Group: User

Wrote

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
#8 Posted: 3/21/2017 10:14:01 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

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 (75 KiB) downloaded 74 time(s).

eigenAll Companion.sm (49 KiB) downloaded 77 time(s).
  • New Posts New Posts
  • No New Posts No New Posts