Curve fitting function

Curve fitting function - Is there a curve fitting function in Smath? - Сообщения

#1 Опубликовано: 3 года назад
rex

rex

1 сообщений из 10 понравились пользователям.

Группа: User

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!
#2 Опубликовано: 3 года назад
rex

rex

1 сообщений из 10 понравились пользователям.

Группа: User

Wrote

... 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 (36 КиБ) скачан 103 раз(а).
Genfit Algo Include Test UpDated.sm (145 КиБ) скачан 98 раз(а).



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
#3 Опубликовано: 3 года назад
CBG

CBG

77 сообщений из 312 понравились пользователям.

Группа: User

Hello

Maybe you can deal with Least Squares Fit

Define_a_Variable_Ajust_by_Last_Square.sm (58 КиБ) скачан 137 раз(а).

Ajust_by_Last_Square_Selection.sm (54 КиБ) скачан 100 раз(а).

Best Regards

Carlos
#4 Опубликовано: 3 года назад
overlord

overlord

558 сообщений из 1 335 понравились пользователям.

Группа: Moderator

Wrote

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 (26 КиБ) скачан 110 раз(а).

Click to enlarge

Click to enlarge

Click to enlarge

Click to enlarge
2 пользователям понравился этот пост
sergio 3 года назад, Alvaro Diaz Falconi 3 года назад
#5 Опубликовано: 3 года назад
rex

rex

1 сообщений из 10 понравились пользователям.

Группа: User

Wrote

Hello

Maybe you can deal with Least Squares Fit

Define_a_Variable_Ajust_by_Last_Square.sm (58 КиБ) скачан 137 раз(а).

Ajust_by_Last_Square_Selection.sm (54 КиБ) скачан 100 раз(а).

Best Regards

Carlos



Hi Carlos,

This works really fine, thanks for sharing this!
#6 Опубликовано: 3 года назад
rex

rex

1 сообщений из 10 понравились пользователям.

Группа: User

Wrote

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 (26 КиБ) скачан 110 раз(а).

Click to enlarge

Click to enlarge

Click to enlarge

Click to enlarge



Hi, thanks for sharing this, I will try to learn your file!
#7 Опубликовано: 3 года назад
Martin Kraska

Martin Kraska

1 230 сообщений из 2 156 понравились пользователям.

Группа: Moderator

Wrote

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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
sergio 3 года назад
#8 Опубликовано: 3 года назад
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 004 сообщений из 1 677 понравились пользователям.

Группа: User

Hi. Some fitting curves functions in the attached.

fit.pdf (527 КиБ) скачан 147 раз(а).
fit.sm (377 КиБ) скачан 123 раз(а).

Best regards.
Alvaro.
3 пользователям понравился этот пост
NDTM Amarasekera 3 года назад, sergio 3 года назад, Fridel Selitsky 3 года назад
#9 Опубликовано: 3 года назад
overlord

overlord

558 сообщений из 1 335 понравились пользователям.

Группа: Moderator

Wrote

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
#10 Опубликовано: 3 года назад
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 004 сообщений из 1 677 понравились пользователям.

Группа: User

Hi ovlerlord.

Wrote

Answer is YES



Yes, it is YES.

Wrote


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 (22 КиБ) скачан 101 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
overlord 3 года назад
#11 Опубликовано: 3 года назад
rex

rex

1 сообщений из 10 понравились пользователям.

Группа: User

Wrote

Wrote

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 (128 КиБ) скачан 73 раз(а).
Genfit Kirby_2 [Reduced] Copy.sm (81 КиБ) скачан 83 раз(а).

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



Файл не найден.Файл не найден.

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!
#12 Опубликовано: 3 года назад
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 004 сообщений из 1 677 понравились пользователям.

Группа: User

Wrote



Файл не найден.Файл не найден.



Hi. Three fitting models for your data.

fit_stress_strain.sm (523 КиБ) скачан 105 раз(а).
fit_stress_strain.pdf (635 КиБ) скачан 120 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
Fridel Selitsky 3 года назад
#13 Опубликовано: 3 года назад
rex

rex

1 сообщений из 10 понравились пользователям.

Группа: User

Wrote

Wrote



Файл не найден.Файл не найден.



Hi. Three fitting models for your data.

fit_stress_strain.sm (523 КиБ) скачан 105 раз(а).
fit_stress_strain.pdf (635 КиБ) скачан 120 раз(а).

Best regards.
Alvaro.



Wow, it's amazing!
Thanks Alvaro!
#14 Опубликовано: 3 года назад
Jean Giraud

Jean Giraud

983 сообщений из 6 866 понравились пользователям.

Группа: User

Wrote

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 ?
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений