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 rex he  
#1 Posted : 13 January 2022 13:38:26(UTC)
rex he


Rank: Member

Groups: Registered
Joined: 15/10/2019(UTC)
Posts: 10
China
Location: Suzhou

Was thanked: 1 time(s) in 1 post(s)
Hello,
Is there any curve fitting function in Smath?
I mean using the defined points to find the function of these points!
Thanks a lot!

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

Offline rex he  
#2 Posted : 14 January 2022 06:00:26(UTC)
rex he


Rank: Member

Groups: Registered
Joined: 15/10/2019(UTC)
Posts: 10
China
Location: Suzhou

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... for best examination: close Smath ... open a virgin session.
This way, as you will download, both will be resident in same session.
Open include to inspect the content, close back.
Open Test UpDated ... F9 to run
Test Updated contents 5 stand alone fit examples.
If it does not work wrt your Smath version ... bug.
Try it ... report ... Jean

Genfit Algo Include.sm (37kb) downloaded 28 time(s).
Genfit Algo Include Test UpDated.sm (146kb) downloaded 23 time(s).


Hi Jean,
Thanks for your reply!
I tired the .sm file, but it doesn't work well. Meanwhile, the Genfit Algo Include.sm needs rename as GenfitAlgoInclude.sm.

I put the two .sm files in the same location, tSmath_error.pnghen I opened the Test Updated.sm, and pressed F9 to run....the error is shown in the picture.
The information of my Smath is Version 0.99
Looking forward to your feedback, thanks!

[attach]42964

Edited by user 14 January 2022 06:02:44(UTC)  | Reason: Not specified

Offline CBG  
#3 Posted : 14 January 2022 06:53:11(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Hello

Maybe you can deal with Least Squares Fit

Define_a_Variable_Ajust_by_Last_Square.sm (59kb) downloaded 51 time(s).

Ajust_by_Last_Square_Selection.sm (55kb) downloaded 25 time(s).

Best Regards

Carlos

Edited by user 14 January 2022 06:55:57(UTC)  | Reason: Not specified

Offline overlord  
#4 Posted : 14 January 2022 08:04:40(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,125
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: rex he Go to Quoted Post
I mean using the defined points to find the function of these points!

Answer is YES
I don't know an embedded function for this.
But you can write your own function.
Lagrange Interpolation Method can be used.
maple() command is not necessary but it simplifies the function.
Giving more points, curve gets more complex.
Here is some examples for your request.

Regards

lagrange.sm (27kb) downloaded 29 time(s).

Click to enlarge

Click to enlarge

Click to enlarge

Click to enlarge

Edited by user 15 January 2022 14:20:22(UTC)  | Reason: Not specified

thanks 2 users thanked overlord for this useful post.
on 14/01/2022(UTC),  on 14/01/2022(UTC)
Offline rex he  
#5 Posted : 14 January 2022 08:55:13(UTC)
rex he


Rank: Member

Groups: Registered
Joined: 15/10/2019(UTC)
Posts: 10
China
Location: Suzhou

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: CBG Go to Quoted Post
Hello

Maybe you can deal with Least Squares Fit

Define_a_Variable_Ajust_by_Last_Square.sm (59kb) downloaded 51 time(s).

Ajust_by_Last_Square_Selection.sm (55kb) downloaded 25 time(s).

Best Regards

Carlos


Hi Carlos,

This works really fine, thanks for sharing this!
Offline rex he  
#6 Posted : 14 January 2022 08:57:10(UTC)
rex he


Rank: Member

Groups: Registered
Joined: 15/10/2019(UTC)
Posts: 10
China
Location: Suzhou

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: overlord Go to Quoted Post
Answer is YES
I don't know an embedded function for this.
But you can write your own function.
Lagrange Interpolation Method can be used.
maple() command is not necessary but it simplifies the function.
Giving more points, curve gets more complex.
Here is some examples for your request.

Regards

lagrange.sm (27kb) downloaded 29 time(s).

Click to enlarge

Click to enlarge

Click to enlarge

Click to enlarge


Hi, thanks for sharing this, I will try to learn your file!
Offline mkraska  
#7 Posted : 14 January 2022 11:36:56(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: rex he Go to Quoted Post
Hello,
Is there any curve fitting function in Smath?
I mean using the defined points to find the function of these points!
Thanks a lot!


Maxima plugin has the Fit() function, see this post

In the interactive handbook, you find it in the Function Index page.


2022-01-14 09_32_53-Reference book.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 14/01/2022(UTC)
Offline Razonar  
#8 Posted : 14 January 2022 12:56:58(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. Some fitting curves functions in the attached.

fit.pdf (528kb) downloaded 37 time(s).
fit.sm (378kb) downloaded 36 time(s).

Best regards.
Alvaro.
thanks 3 users thanked Razonar for this useful post.
on 14/01/2022(UTC),  on 14/01/2022(UTC),  on 14/01/2022(UTC)
Offline overlord  
#9 Posted : 14 January 2022 16:56:33(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,125
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: rex he Go to Quoted Post
Hi, thanks for sharing this, I will try to learn your file!

You are welcome.
My function is direct method, may not be suitable for large data sets.
Razonar's and mkraska's samples are good to investigate too for that purpose.

Regards
Offline Razonar  
#10 Posted : 14 January 2022 22:25:17(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 ovlerlord.

Originally Posted by: overlord Go to Quoted Post
Answer is YES


Yes, it is YES.

Originally Posted by: overlord Go to Quoted Post

Lagrange Interpolation Method can be used.
maple() command is not necessary but it simplifies the function.


This version of your application doesn't need maple for get the simplified lagrange polynom.

lagrange.sm (23kb) downloaded 29 time(s).

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 14/01/2022(UTC)
Offline rex he  
#11 Posted : 17 January 2022 06:15:21(UTC)
rex he


Rank: Member

Groups: Registered
Joined: 15/10/2019(UTC)
Posts: 10
China
Location: Suzhou

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: rex he Go to Quoted Post
Hi Jean,
Thanks for your reply!

Please, attach your raw data set., i.e: not freaked by else.
Two more examples attached.

Genfit Frechet DIFFICULT.sm (129kb) downloaded 6 time(s).
Genfit Kirby_2 [Reduced] Copy.sm (82kb) downloaded 6 time(s).

A fitting session is mostly governed by the model and techniques.
In short: sky is the limit. Some data set can only be fitted by hand.
Plenty are willing in Smath Community.
Take care ... Jean



Strain.txt (14kb) downloaded 5 time(s). Stress.txt (14kb) downloaded 5 time(s).

Hi Jean,

see the stress-strain data, I would say I am really happy about this forum. I got a lot of fit function information from here! Thanks all!
Offline Razonar  
#12 Posted : 17 January 2022 10:55:01(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: rex he Go to Quoted Post


Strain.txt (14kb) downloaded 5 time(s). Stress.txt (14kb) downloaded 5 time(s).


Hi. Three fitting models for your data.

fit_stress_strain.sm (524kb) downloaded 36 time(s).
fit_stress_strain.pdf (636kb) downloaded 33 time(s).

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 17/01/2022(UTC)
Offline rex he  
#13 Posted : 17 January 2022 11:58:00(UTC)
rex he


Rank: Member

Groups: Registered
Joined: 15/10/2019(UTC)
Posts: 10
China
Location: Suzhou

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Razonar Go to Quoted Post
Originally Posted by: rex he Go to Quoted Post


Strain.txt (14kb) downloaded 5 time(s). Stress.txt (14kb) downloaded 5 time(s).


Hi. Three fitting models for your data.

fit_stress_strain.sm (524kb) downloaded 36 time(s).
fit_stress_strain.pdf (636kb) downloaded 33 time(s).

Best regards.
Alvaro.


Wow, it's amazing!
Thanks Alvaro!
Offline Jean Giraud  
#14 Posted : 27 January 2022 00:21:34(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: rex he Go to Quoted Post
Hi Jean,
Thanks for your reply!
I tried the .sm file, but it doesn't work well.

You have detected a bug wrt your SS version, maybe earlier ones ?
Silent Smath Community ?
If you open the governing Conjugate Gradient ... it could be
the symbolic module has not been saved Symbolic, a common bug reported.
By same token, I will delete all previous attachments.
Please, don't hesitate ... Take care ... Jean.
I guess your original raw data is the one from Alvaro ?
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.