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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Jean Giraud  
#1 Posted : 17 September 2015 07:06:09(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)
Desambiguation and know more.
Cubic spline "ainterp" and the likes are little useful
but more generally "useless".

Jean
File Attachment(s):
Spline Edu.sm (38kb) downloaded 109 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 17/09/2015(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 17 September 2015 20:02:00(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Jean,

Vary nice analysis, thank you.

Just wanted to tell you and to remind myself (I hope I was right). The three spline functions were made long time ago by Andrey just for the first aid regarding the spline interpolation. In the meantime there were plugins made by the good willing people in their spare time (only few of them unfortunately) which included lots of new numerical functions from the various libraries. Documentation of the plugins is still a problematic issue. As far as I know the only systematic presentation of the available functions is made by Martin Kraska in the SMath Studio Reference Handbook (can be downloaded from the Gallery). I think that Martin is trying to keep the Documentation as up-to-date us possible. I would just kindly ask you to take a look at the available plugins and I am sure you would have then some request to the plugin makers for the implementing the new better functions and libraries (including the various ones you mentioned).

Best Regards,
Radovan

P.S. By the way, If you browse the Forum you will find lots of complaints regarding SMath behavior. To make myself clear, people wanted the SMath to be better - like you and me.

Edited by user 17 September 2015 20:08:33(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#3 Posted : 22 September 2015 06:46:14(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)
Sorry all Collabs, I want to correct myself.

linterp: just didactic for straight junction
ainterp and cinterp are much differents.

Occasionally either one will do apparently same, but no so !

In the attached "Quadratic spline", cinterp does a much better job.
in the attached "Hermite cubic", just the opposite: cinterp is
totally zombie while ainterp is excellent .

What's gorgeous about either the 3 [linterp, ainterp, cinterp] is the
populating of sparse matrix for surface plot. Will post in few days.

What puzzles me is the derivative operator in Smath. It is not scalar
at all and excludes plotting either "spline interp" unlike Mathcad.
I have the basic Mathcad code of the derivative operator but not sure
yet if it can be made Smath companion. Please read carefully "Hermite"
the local definition operator is the code that highlights the granularity
of the Smath derivative operator.

The work sheet "Granularity" exemplifies what it means in all aspects
of applied numerical maths. I bet some plugins are 64 bits extended
floating while Smath is 32 bits, so that they don't digest the same food.

Cheers, Jean
File Attachment(s):
Spline Quadratic Holistic.sm (110kb) downloaded 52 time(s).
Spline Cubic Hermite.sm (63kb) downloaded 50 time(s).
Untitled Granularity.sm (11kb) downloaded 46 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 22/09/2015(UTC)
Offline omorr  
#4 Posted : 22 September 2015 12:59:11(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Jean,

Thank you again for your worksheets and the analysis.

Originally Posted by: Jean Giraud Go to Quoted Post
What puzzles me is the derivative operator in Smath. It is not scalar
at all and excludes plotting either "spline interp" unlike Mathcad...

This particular problem about derivative operator was already mentioned (many times even by myself). As you are going forward with your analysis, I think that you are going to find lots of this numerical weaknesses of SMath. Lots of times has been mentioning here about the SMath numerical problems and you can browse the Forum about it. The main cause IMHO is the symbolical core of SMath. This is the main SMath working core and the numerical one is something like a "patch" (just the opposite comparing to Mathcad). Therefore, you might find lots of problematic calculations which will only work with the "numerical" optimization or using the eval() function. In the past, that kind of evaluations even did not exist in SMath. Lots of people would like that SMath is going to be more numerically oriented and that its numerical strength would be higher. Unfortunately, I am not sure this is going to happen unless the complete core is changed (rather low probability, I think). At the moment, I think this numerical SMath weaknesses might be remedied by the numerical plugins to same extent regarding the mentioned SMath limitations and its problematic "symbolical" engine.

Regards,
Radovan

Edited by user 22 September 2015 13:12:11(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#5 Posted : 24 September 2015 07:19:41(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)
Hello Radovan,

I read your general comment, word by word. Quite right in all,
but my reserve is that like in Mathcad, most users go to bed
before exhausting their work or like reading papers, too much
in diagonal. True: Allan Razdow [the creator of Mathcad associated
with the creators of TK Solver] was very good coach at time of Mathsoft.
Many Collabs of the "Mathsoft Collaboratory" were "Neerds".

On the other end the core Maple of Smath does a lot better job than
Mathcad 11, especially for inversing functions which is an essential
CAS tool for Scientific/Engineering. My Platinum RTD in Smath is
just "Bingo Quick" ,,, gorgeous compared to Mathcad 11 !

I wish Martin can help coding the remaing of the attached l_p_cspline
Smath work sheet. Up to where it is in the attached, superb for Edu.
RemToDo: discretise, and work around the "while loop ... return"

Cheers, see you soon ... Jean
File Attachment(s):
Spline l_p_c.sm (98kb) downloaded 57 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 24/09/2015(UTC)
Offline omorr  
#6 Posted : 24 September 2015 11:48:46(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Jean,

Another very nice example Good . Thank you.

Just to say for myself, I also managed to transfer from Mathcad to Smath almost all I needed.

Originally Posted by: Jean Giraud Go to Quoted Post

On the other end the core Maple of Smath does a lot better job than
Mathcad 11, ...

I am not sure what did you want to say here.

Just to be precise, SMath has its own symbolic engine in its core - that is one thing. I was talking about this symbolic engine which is problematic. Another things are the existing symbolic implementations via CAS plugins. There are two of them for desktop SMath. Maple Wraper plugin maintained by uni (Viacheslav Mezencev) and MaximaPlugin maintained by mkraska (Martin Kraska). If you are satisfied with them, that is all right with me Good

Regards,
Radovan

Edited by user 24 September 2015 12:56:32(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#7 Posted : 24 September 2015 20:19:18(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)
Another very nice example Good . Thank you.

Just to say for myself, I also managed to transfer from Mathcad to Smath almost all I needed.

I am not sure what did you want to say here [Radovan].
_________________________________________

The Smath Maple Wrapper is more powerful than Mathcad/Maple 11 ... examples: root, solve ...

Maxima Plugin almost does not work in my Smath version June 2015.

What you mean about Smath "own symbolic" is probably few book style integrals, derivatives, exponetial conversions ... etc.

In the attached, the l_p_c splines work completely except for the granularity in the derivative,
nothing to do in there unless Andrey reads us. The bugger is the segmentation wrt the derivative code . If it works in Mathcad that's surely because the designers included an epsilon that freaks the segmentation but not invalidates the general code.
Or an otherwise related "return" code
Do you still have Mathcad active in your PC ? which version ?
My web site [200 MB] of Mathcad 11 Single User might still be active for visitors to download.
It is dead for me because on May 30 3:42 PM PTC deactivated all Single User Edition and by same token the download from the web site is dead so that I can't even open in *.PDF or print
,,, I have PTC where you know !

Google for : mathengjmg ,,,,, that will direct you to my now dead former Mathcad 11 repository

Cheers, Jean
File Attachment(s):
Spline l_p_c.sm (85kb) downloaded 35 time(s).
Offline Jean Giraud  
#8 Posted : 25 September 2015 04:46:40(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)
Hello ! Radovan [and visitors],

I have just added the complimentary "dspline".
On more RemToDo: "intspline".

Thanks for more comments

Cheers, Jean
File Attachment(s):
Spline l_p_c.sm (102kb) downloaded 44 time(s).
Offline omorr  
#9 Posted : 25 September 2015 11:12:40(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Jean,
Originally Posted by: Jean Giraud Go to Quoted Post
The Smath Maple Wrapper is more powerful than Mathcad/Maple 11 ... examples: root, solve ...

Maxima Plugin almost does not work in my Smath version June 2015.

Maple Wrapper and Maxima Plugin might do almost all the job the users need but they have quite "rough edges" at the moment. We should be aware and have respect that these plugins are maintained by the good willing people in their spare time. Therefore, when they will work depends of those people.

Originally Posted by: Jean Giraud Go to Quoted Post
What you mean about Smath "own symbolic" is probably few book style integrals, derivatives, exponetial conversions ... etc.

I think I am not the right person to answer this question. I just think that the Andrey had some intention about extending the SMath symbolical calculation capabilities (just look under Calculation main menu) but it was never done. To repeat, this is just my opinion. The complete answer Andrey could give you.

Originally Posted by: Jean Giraud Go to Quoted Post
In the attached, the l_p_c splines work completely except for the granularity in the derivative,
nothing to do in there unless Andrey reads us. The bugger is the segmentation wrt the derivative code . If it works in Mathcad that's surely because the designers included an epsilon that freaks the segmentation but not invalidates the general code.

All my respect for the Mathcad files you have made. There is lot of work involved there. By converting some of them into SMath you might find where the SMath week spots are ant to have some proposals to improve it. I did that this way and nagged here on the Forum when I found problems Good .

As for the presented spline functions, I would like have them them packaged (lspline(), pspline(), cspline) including the mentioned and wanted dspline() and intspline(). I mentioned that few times because these things are quite basic calculations one needs in any numerical analysis.

Moreover, there are also few numerical plugins (mostly made by uni) which implements some of the functions from the numerical libraries like Matlab-C-Math-Library, GNU-Scientific-Library etc. Actually, at the moment there are many numerical functions in the plugins and the problem is to find them in SMath. SMath still misses some kind of organized functions list from various plugins.

Regards,
Radovan

Edited by user 25 September 2015 17:42:49(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#10 Posted : 26 September 2015 07:20:14(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)
Hello Radovan,

"Star search" [Smath expression] is missing about plugins.
I noticed some work sheet from Martin do work from download
but "not all components accessed". Do you want a star search
If I answer yes, the all work sheet turns red !!!

It would be possible to automate l_p_c splines like in Mathcad
Their use and almost only use is to populate a matrix for
surface plot. But Smath 'ainterp' does it as a function to
include in the CreateMesh.

About the splines we are in business, I have just discovered
the most dramatic Smath bug. You can scrap the previous work
sheet or modify. The bug is about extractong 's'

s:=M^-1*br is the bug. It does not show on small size but
above an unknown size it flies in the blue and finishes
crashing Smath . 's' must be a local assigment s:=|M^-1*br.

I have added the cumulative integral in [Suite] were the
data set is well populated to exemplify the procedure.
Be cautious: if the data set is noisy, the spline integrate
is for the birds ... use the finite differences.

I bet I'm all done with that one

Cheers, Jean
File Attachment(s):
Spline l_p_c.sm (139kb) downloaded 39 time(s).
Spline l_p_c [Suite].sm (47kb) downloaded 40 time(s).
Offline omorr  
#11 Posted : 26 September 2015 16:57:11(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you Jean
Originally Posted by: Jean Giraud Go to Quoted Post
Hello Radovan,
s:=M^-1*br is the bug. It does not show on small size but
above an unknown size it flies in the blue and finishes
crashing Smath . 's' must be a local assigment s:=|M^-1*br.
Cheers, Jean

Welcome to the "dark corners" of SMath. Here, it is probably the line() command gives you headache. It should be s:=M^-1*br and not s:=|M^-1*br. If I leave that way, the calculation will be quite long (I did not have a patience to wait that long - it might crash though). The problem might be that whenever you use 's' defined with line(), then 's' will be called like a function - every time you call it, the calculation will be repeated (imagine what is going one in a loop with 's' then with large matrix and matrix inversion).

On the other hand, it is always advisable to right click on a region and choose Optimization->Numeric or None or to use eval() if you need strictly the numerical answer. If you browse the Forum there were lots of examples when this helped.

Regards,
Radovan

Edited by user 26 September 2015 17:52:06(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#12 Posted : 27 September 2015 06:44:58(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)
Welcome to the "dark corners" of SMath. Here, it is probably the line() command gives you headache. It should be s:=M^-1*br and not s:=|M^-1*br. If I leave that way, the calculation will be quite long (I did not have a patience to wait that long - it might crash though). The problem might be that whenever you use 's' defined with line(), then 's' will be called like a function - every time you call it, the calculation will be repeated (imagine what is going one in a loop with 's' then with large matrix and matrix inversion).

On the other hand, it is always advisable to right click on a region and choose Optimization->Numeric or None or to use eval() if you need strictly the numerical answer. If you browse the Forum there were lots of examples when this helped.

____________________________________________

Believe me Radovan when things don't work, I hammer the nail down to earth plasma.
The conventional M^-1*br does not work because the matrix is tridiagonal. It does
not work the quadratic spline either. It works only for matrices more conventional
not having some of the corners 0's .

BTW: I just put the last brick in the wall in that one.

Cheers, Jean
File Attachment(s):
Spline l_p_c [Suite].sm (56kb) downloaded 57 time(s).
Offline omorr  
#13 Posted : 27 September 2015 10:03:16(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you Jean

I respect your persistence Good

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Users browsing this topic
Guest
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.