Maple Tools

Maple Tools - Symbolic engine for SMath Studio. - 消息

#361 已发布: 2019/2/6 06:37:21
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

Wrote

Hello Uni,

The plugin is broken again since Smath v.6962 (I'm sure only with ..62 at the end).
I've spent half of an hour and located the issue.
It is a tiny piece of a big worksheet.

Best regards

mapledoesntworksince6962.sm (21.68 KiB)已下载 1791 次。



There aren't maple() funtions involved here, therefore can't be a maple tools issue.

You can fix it in this way:

2019-02-06 10_35_44-Window.png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1位用户喜欢此帖子
Igor Skarine 2019/2/6 11:08:00
#362 已发布: 2019/2/6 11:20:12
Igor Skarine

Igor Skarine

14个赞,共97个帖子。

组: User

Thanks Davide,
But I wrote the f_poly(v) few years ago and there were no troubles till 6965b.
It's strange that even minor update requires to review very old (considered reliable) worksheets.
f_poly() is pure numerical function and contains tons of evals .
How is it possible to corrupt posterior symbolic calculations?
#363 已发布: 2019/2/6 14:41:19
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

Wrote

But I wrote the f_poly(v) few years ago and there were no troubles till 6965b.
It's strange that even minor update requires to review very old (considered reliable) worksheets.
f_poly() is pure numerical function and contains tons of evals .
How is it possible to corrupt posterior symbolic calculations?



I haven't checked if there are differenes in p content between the versions but I see that in the problem is involved cases(...); if you move the eval fomr the p definition to the "if" condition of cases you have the script working again...

Wrote

Support for evaluation plug-ins improved.



I can't check it right now but this is probably the change that makes the difference (SS 0.99.6970).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#364 已发布: 2019/2/28 15:24:56
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hi. Just a very small issue with subscripts:

Clipboard01.gif

Best regards.
Alvaro.
1位用户喜欢此帖子
#365 已发布: 2019/2/28 23:37:10
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Hi. Just a very small issue with subscripts:



Yellow is OK, a one element vector.

maple(vi).PNG
#366 已发布: 2019/4/10 10:05:35
Igor Skarine

Igor Skarine

14个赞,共97个帖子。

组: User

Hello Uni,
Recently I found another problem in symbolic calculations that probably related to maple plugin.
Let see the example in attachment.
This is simple example of constructing of system of equations for circuit of 3-rd order.
I need 2*3+2 equations some of them define frequency response, some define of the position of minimums/maximums or the transfer function.
The problem happens with taking derivatives. Smath can't calculate them without involving maple plugin. Try disabled equation for H1(n,k,b,w).
But using maple(simplify()) it does it right. After this step H1(n,k,b,w) became useless. Any symbolic expression that uses it returns "empty".
But if I use copy-pasted output of the H1(n,k,b,w), everything works fine. It looks like I need to force the symbolic result to be evaluated at some point,
similar to eval() for numeric calculations, but I don't understand how to do that.

equ3.sm (33.2 KiB)已下载 1578 次。
#367 已发布: 2019/4/10 11:26:13
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hi. Try this.

equ3.sm (32.4 KiB)已下载 1615 次。

Best regards.
Alvaro.
1位用户喜欢此帖子
Igor Skarine 2019/4/10 12:13:00
#368 已发布: 2019/4/10 12:15:55
Igor Skarine

Igor Skarine

14个赞,共97个帖子。

组: User

Alvaro,
Your version works. Do you have an idea how to generate sub-indexes from Range ? I need to generalize it for different n.
Best regards,
Igor
#369 已发布: 2019/4/10 12:48:37
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

The problem happens with taking derivatives.
Smath can't calculate them without involving maple plugin.


maple not needed to take derivative, directly from Smath native.

TOM_doctored.PNG

TOM.sm (17.5 KiB)已下载 1528 次。
#370 已发布: 2019/4/10 13:00:15
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Wrote

Do you have an idea how to generate sub-indexes from Range ? I need to generalize it for different n.



Hi Igor. Use this

Clipboard01.jpg

equ3.sm (32.86 KiB)已下载 1609 次。

Best regards.
Alvaro
1位用户喜欢此帖子
Igor Skarine 2019/4/10 14:24:00
#371 已发布: 2019/4/10 16:39:59
Вячеслав Мезенцев

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

1,558个赞,共1,868个帖子。

组: Moderator

I think that here is the same problem that I mentioned earlier. maple() function doesn't know how to work with external definitions. Arguments must be explicitly defined. This limits the possibilities for its use. This is due to uncertainty - it is not clear what function is implied in the expression: maple diff() or smath diff(). Same for int() and others. I don't know how to solve this.
Russia ☭ forever, Viacheslav N. Mezentsev
#372 已发布: 2019/4/10 16:56:22
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Wrote

I think that here is the same problem that I mentioned earlier. maple() function doesn't know how to work with external definitions. Arguments must be explicitly defined. This limits the possibilities for its use. This is due to uncertainty - it is not clear what function is implied in the expression: maple diff() or smath diff(). Same for int() and others. I don't know how to solve this.



Hi. This is a workaround: use maple's 'value' function, which convert inert versions of some procedures to the actual procedures for evaluation. Usually, inert version have the same name, but with the first letter in uppercase.

Notice that for Diff you must to disable Maxima plugin.

Clipboard01.jpg

Best regards.
Alvaro.

2位用户喜欢此帖子
Вячеслав Мезенцев 2019/4/11 08:00:00, frapuano 2019/4/10 17:07:00
#373 已发布: 2019/4/10 18:48:53
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

... ? any suite/comment

TOM_algo.PNG
#374 已发布: 2019/4/11 10:22:12
Igor Skarine

Igor Skarine

14个赞,共97个帖子。

组: User

I'd like to clarify the problem. There were two issues in my worksheet.

1. Symbolic differentiation works strange: if you evaluate dA/dx symbolically and A is not a function of x it returns 0. That is correct.
But if A is an indexed variable it returns dA[k]/dX = dA[k]/dx, that's wrong, A[k] is not a function of x. That was the reason to change indexes to subscripts.

2. I found workaround using maple(simplify(dA[k]/dx))=0. I can get right result in this case, but I can't use it in futher calculations. This is the main issue.
If I'd be able to use the symbolic result as it was generated by maple plugin everything would be fine. Instead, Smath postpones symbolic evaluation and eventually
reports "empty" or something like that when the expression gets too complicated.
#375 已发布: 2019/4/11 12:02:02
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

I'd like to clarify the problem. There were two issues in my worksheet.


The first issue is the undefined upper limit in the summation.
I made it Floor [in conformity to Mathcad]
The 2nd issue is that maple has nothing to do in there.
Native Smath expands symbolic, that you just assign.
Once in there, you have two options:
1. Infinitesimal derivative
2. d/dx Smath operator fully compatible with expand(μ,b,ω)
What is the problem ?
Naturally, the vector of 'b' does not come from the sky
You must create from source, or otherwise create from
some kind of creator. I just put anything for demo
but it can be anything else as well for you to try.

Interesting brain storm ... Jean

0Appendix [BirdNest].sm (16.12 KiB)已下载 1429 次。
#376 已发布: 2019/4/11 13:40:38
Igor Skarine

Igor Skarine

14个赞,共97个帖子。

组: User

Jean,
Regarding issue #1 I attached sym_diff_issue.sm (3.47 KiB)已下载 1528 次。.
Where do you see "undefined upper limit" ?
For issue #2 I attached equ3+remarks.sm (33.91 KiB)已下载 1603 次。 with remarks.
Regards,
Igor
#377 已发布: 2019/4/11 14:35:28
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Where do you see "undefined upper limit" ?


From some expansion of your original with odd 'n' [n=3]
Smath reported the error
just to confirm wrt Mathcad that 'Floor' by default
Will check the other issue tonight.
Jean
#378 已发布: 2019/4/11 18:46:50
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Where do you see "undefined upper limit" ?


For the other issues equ3_remarks, your programs are incorrect.
Set n=3 to see something

equ3_remarks.sm (66.61 KiB)已下载 1580 次。

Issues.PNG

#379 已发布: 2019/4/11 19:22:32
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Igor,
Your working algorithm is exemplified part 2 of the attached.
Try it starting n>= 3.
From there, past the derivative, what else should it be doing ?

Cheers ... Jean

0Appendix [BidirectionalPulse].sm (22.34 KiB)已下载 1393 次。
#380 已发布: 2019/4/12 09:20:46
Igor Skarine

Igor Skarine

14个赞,共97个帖子。

组: User

Thanks Jean,
Don't waste your time, I already have solved the problem.
The n supposed to be odd number in the range 3,5,7,9,11. The practical case was 9.
The goal was to derive system of 22 equations. They looked too complicated for doing it manually.
I posted simplest case n=3 just to illustrate the issues I've encountered.
Sorry, I can't go into details, that is a kinda commercial project .
  • 有新帖
  • 无新帖