Why I have errors?

Why I have errors? - See please the attached file - Messaggi

#1 Pubblicato: 14/10/2023 15:31:44
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

See please the end of the attached file.
6-1-Mister-Class.sm (33,29 KiB) scaricato 1282 volta(e).
#2 Pubblicato: 14/10/2023 21:38:32
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Wrote

See please the end of the attached file.


Triplet roots ... FindRoot not doctored.

6-1-Mister-Class (1).sm (66,16 KiB) scaricato 1297 volta(e).

#3 Pubblicato: 14/10/2023 21:42:14
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

The first error can be handled by wrapping the function in eval(). For the second one this does not help.

I take the opportunity to advertise the Maxima Fit() function.

It is explained in https://doi.org/10.25933/opus4-2949 chapter 6 (English) and in https://doi.org/10.25933/opus4-2948, chapter 9 (German).

6-1-Mister-Class Kr.sm (56,11 KiB) scaricato 1333 volta(e).
2023-10-14 16_31_26-SMath Solver - [6-1-Mister-Class (2).sm_].png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
Valery Ochkov 14/10/2023 21:45:00
#4 Pubblicato: 14/10/2023 21:53:20
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

And the Lord God created the function eval and the lord said this is good!
And the Lord God created the Maxima and the lord said this is sehr kompliziert!
#5 Pubblicato: 14/10/2023 22:52:25
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

Hm, where exactly do you see the most severe сложности in the use of the Maxima plugin? Perhaps everything that needs a handbook is too complicated nowadays
I really like the curve fitting interface with the Fit() function, which might even be comprehensible from the подсказка in the dynamic help.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#6 Pubblicato: 15/10/2023 00:19:13
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Hi. Polynomial fitting, returning the same values that Excel returns. From this post.

fit_CKO.sm (51,22 KiB) scaricato 1390 volta(e).

Best regards.
Alvaro.
#7 Pubblicato: 15/10/2023 14:35:01
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

Sorry!
But the question was Why not How
Why.png
#8 Pubblicato: 15/10/2023 19:51:16
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

Sorry!
But the question was Why not How



Hi Valery. Martin showed why. But for the quadratic case Máxima's Fit function does not return the same result as Excel, which could be said to have been taken as standard, since they are also the same as those usually obtained with the 'all powerful' (talking about of gods) a\b of Matlab. I made the post to show how those mythical values can also be obtained in SMath.

Because SMath' solver isn't very powerful you can get those same values with your method using another, like the following one

Clipboard01.png

About the error vectorizing, you can see why taking a look of this

Clipboard02.png

Best regards.
Alvaro.
1 utenti hanno apprezzato questo post
Valery Ochkov 15/10/2023 20:03:00
#9 Pubblicato: 15/10/2023 20:04:14
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

Wrote

Wrote

Sorry!
But the question was Why not How



Hi Valery. Martin showed why. But for the quadratic case Máxima's Fit function does not return the same result as Excel, which could be said to have been taken as standard, since they are also the same as those usually obtained with the 'all powerful' (talking about of gods) a\b of Matlab. I made the post to show how those mythical values can also be obtained in SMath.

Because SMath' solver isn't very powerful you can get those same values with your method using another, like the following one

Clipboard01.png

About the error vectorizing, you can see why taking a look of this

Clipboard02.png

Best regards.
Alvaro.


Send please sm-file!

#10 Pubblicato: 15/10/2023 20:48:34
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

Send please sm-file!



6-1-Mister-Class with polyfit.sm (39,08 KiB) scaricato 1360 volta(e).
6-1-Mister-Class with polyfit.pdf (226,49 KiB) scaricato 795 volta(e).

Best regards.
Alvaro.
1 utenti hanno apprezzato questo post
Valery Ochkov 15/10/2023 21:20:00
#11 Pubblicato: 15/10/2023 23:25:44
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

There is not much sense in fitting functions with many degrees of freedom to data containing not much information. Any function which goes through the centroid of the data points will come up with a similar MSE.

Is the second result really the best just because of it's lowest MSE?

2023-10-15 18_24_01-SMath Solver - [6-1-Mister-Class Kr.sm].png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#12 Pubblicato: 16/10/2023 00:33:28
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Valery, as it looks all doctored.
Thanks Alvaro for the robust Broyden.
Curious, Solver 30405 Slope/Intercept back on foot.

6-1-Mister-Class (1).sm (65,74 KiB) scaricato 1289 volta(e).
#13 Pubblicato: 16/10/2023 01:06:59
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

And what about 3D fitting in SMath?

See please my old problem in Mathcad
http://twt.mpei.ac.ru/ochkov/car/c_e.html

Online calculation
http://twt.mpei.ac.ru/MCS/Worksheets/old-car.xmcd

#14 Pubblicato: 16/10/2023 05:57:28
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

The second and third fit aren't really robust (quite some dependence on initial guesses)


Gebrauchtwagen.png
Gebrauchtwagen.txt (729 B) scaricato 945 volta(e).
Gebrauchtwagen.sm (90,47 KiB) scaricato 1359 volta(e).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
Valery Ochkov 16/10/2023 12:11:00
#15 Pubblicato: 16/10/2023 12:13:21
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

Wunderbar!
Send me please the M matrix as sm-file!
#16 Pubblicato: 16/10/2023 12:48:56
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Wrote

And what about 3D fitting in SMath?

See please my old problem in Mathcad
http://twt.mpei.ac.ru/ochkov/car/c_e.html

Online calculation
http://twt.mpei.ac.ru/MCS/Worksheets/old-car.xmcd



Another way, from the same previous post .

fit cars.sm (83,96 KiB) scaricato 1368 volta(e).

Best regards.
Alvaro.


#17 Pubblicato: 16/10/2023 13:45:10
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

Thanks!

But the last plot must be so
MCS-Old-Car.png

#18 Pubblicato: 16/10/2023 15:32:33
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

Wrote

Wunderbar!
Send me please the M matrix as sm-file!



The data is from your website. I copy-pasted the table to a new text file and imported it. Just use the files provided in my post.

As to the last plot: I guess the mileage limits of the individual lines are taken from the minimum and maximum slope observed in the age-mileage plot (fig.2 in your reference)?

Do you see any particular problem or do you just want the work getting done?
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#19 Pubblicato: 16/10/2023 18:38:46
Valery Ochkov

Valery Ochkov

67 apprezzamenti in 713 post.

Gruppo: User

do you just want the work getting done?
Yes ;-)
#20 Pubblicato: 17/10/2023 00:58:58
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Global fit Cholesky
Frequently, you can manage the Phi vector for a best regional fit.

Project fit cars Cholesky.sm (19,75 KiB) scaricato 1332 volta(e).
1 utenti hanno apprezzato questo post
Valery Ochkov 17/10/2023 01:09:00
  • Nuovi post
  • Nessun nuovo post