Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


23 Pages«<1718192021>»
Options
Go to last post Go to first unread
Offline Davide Carpi  
#361 Posted : 06 February 2019 12:37:21(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: tomtit Go to Quoted Post
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 (22kb) downloaded 40 time(s).


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 consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 06/02/2019(UTC)
Offline tomtit  
#362 Posted : 06 February 2019 17:20:12(UTC)
tomtit


Rank: Advanced Member

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

Was thanked: 11 time(s) in 10 post(s)
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?

Edited by user 06 February 2019 19:15:58(UTC)  | Reason: Not specified

Offline Davide Carpi  
#363 Posted : 06 February 2019 20:41:19(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: tomtit Go to Quoted Post
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...

Originally Posted by: Andrey Ivashov Go to Quoted Post
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 consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Razonar  
#364 Posted : 28 February 2019 21:24:56(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. Just a very small issue with subscripts:

Clipboard01.gif

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 01/03/2019(UTC)
Offline Jean Giraud  
#365 Posted : 01 March 2019 05:37:10(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi. Just a very small issue with subscripts:



Yellow is OK, a one element vector.

maple(vi).PNG
Offline tomtit  
#366 Posted : 10 April 2019 16:05:35(UTC)
tomtit


Rank: Advanced Member

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

Was thanked: 11 time(s) in 10 post(s)
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 (34kb) downloaded 34 time(s).
Offline Razonar  
#367 Posted : 10 April 2019 17:26:13(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. Try this.

equ3.sm (33kb) downloaded 42 time(s).

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 10/04/2019(UTC)
Offline tomtit  
#368 Posted : 10 April 2019 18:15:55(UTC)
tomtit


Rank: Advanced Member

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

Was thanked: 11 time(s) in 10 post(s)
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

Edited by user 10 April 2019 18:18:05(UTC)  | Reason: Not specified

Offline Jean Giraud  
#369 Posted : 10 April 2019 18:48:37(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: tomtit Go to Quoted Post
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 (18kb) downloaded 25 time(s).
Offline Razonar  
#370 Posted : 10 April 2019 19:00:15(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: tomtit Go to Quoted Post
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 (33kb) downloaded 34 time(s).

Best regards.
Alvaro
thanks 1 user thanked Razonar for this useful post.
on 10/04/2019(UTC)
Offline uni  
#371 Posted : 10 April 2019 22:39:59(UTC)
uni


Rank: Advanced Member

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

Was thanked: 1274 time(s) in 745 post(s)
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
Offline Razonar  
#372 Posted : 10 April 2019 22:56:22(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: uni Go to Quoted Post
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.

thanks 2 users thanked Razonar for this useful post.
on 10/04/2019(UTC),  on 11/04/2019(UTC)
Offline Jean Giraud  
#373 Posted : 11 April 2019 00:48:53(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... ? any suite/comment

TOM_algo.PNG
Offline tomtit  
#374 Posted : 11 April 2019 16:22:12(UTC)
tomtit


Rank: Advanced Member

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

Was thanked: 11 time(s) in 10 post(s)
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.

Edited by user 11 April 2019 16:33:01(UTC)  | Reason: Not specified

Offline Jean Giraud  
#375 Posted : 11 April 2019 18:02:02(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: tomtit Go to Quoted Post
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 (17kb) downloaded 24 time(s).
Offline tomtit  
#376 Posted : 11 April 2019 19:40:38(UTC)
tomtit


Rank: Advanced Member

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

Was thanked: 11 time(s) in 10 post(s)
Jean,
Regarding issue #1 I attached sym_diff_issue.sm (4kb) downloaded 20 time(s)..
Where do you see "undefined upper limit" ?
For issue #2 I attached equ3+remarks.sm (34kb) downloaded 22 time(s). with remarks.
Regards,
Igor
Offline Jean Giraud  
#377 Posted : 11 April 2019 20:35:28(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: tomtit Go to Quoted Post
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
Offline Jean Giraud  
#378 Posted : 12 April 2019 00:46:50(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: tomtit Go to Quoted Post
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 (67kb) downloaded 17 time(s).

Issues.PNG

Offline Jean Giraud  
#379 Posted : 12 April 2019 01:22:32(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
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 (23kb) downloaded 22 time(s).
Offline tomtit  
#380 Posted : 12 April 2019 15:20:46(UTC)
tomtit


Rank: Advanced Member

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

Was thanked: 11 time(s) in 10 post(s)
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 Mad .

Edited by user 12 April 2019 15:23:03(UTC)  | Reason: Not specified

Users browsing this topic
23 Pages«<1718192021>»
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.