Not quadrat matrix

Not quadrat matrix - Messages

#1 Posted: 11/1/2023 12:37:35 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

The work with not quadrat matrix.
How better solve?
See please the attached sm-file.
1-Asteroid-5-Points.sm (25 KiB) downloaded 40 time(s).
#2 Posted: 11/1/2023 11:19:48 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

The work with not quadrat matrix.
How better solve?


As it looks, the blue planet and green voyager are tangent.
Take care Valery ... Jean.

1-Asteroid-5-Points.sm (34 KiB) downloaded 27 time(s).

#3 Posted: 11/2/2023 12:18:02 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi Valery. You can use dn_LinAlgLLS_SVD or dn_LinAlgLLS_COF or dn_LinAlgLLS_QRorLQ for non-square matrices, instead dn_LinAlgSolve.

1-Asteroid-5-Points.sm (27 KiB) downloaded 20 time(s).

Best regards.
Alvaro.

1 users liked this post
Valery Ochkov 11/2/2023 1:46:00 AM
#4 Posted: 11/2/2023 2:52:03 AM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Thanks Alvaro.
10-2-Asteroid-7-points.sm (21 KiB) downloaded 32 time(s).

#5 Posted: 11/2/2023 3:27:28 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

A little more compact.

Clipboard03.png

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 11/2/2023 11:47:00 AM
#6 Posted: 11/2/2023 12:03:29 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Thanks Alvaro.
New problem with Ranks
10-2-Asteroid-7-points-Rank.sm (16 KiB) downloaded 32 time(s).
10-2-Asteroid-7-points-Rank.png
#7 Posted: 11/2/2023 2:58:52 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

... New problem with Ranks


Hi Valery. SMath really needs to improve on linear algebra. As a workaround, you can redefine rank with a plugin

Clipboard01.png

Also, the problem with rank is not that it can't deal with complicated arrays, it can't handle simple ones either

Clipboard02.png

10-2-Asteroid-7-points-Rank.sm (19 KiB) downloaded 30 time(s).

Best regards-
Alvaro.
2 users liked this post
sergio 11/2/2023 4:00:00 PM, Valery Ochkov 11/2/2023 8:09:00 PM
#8 Posted: 11/2/2023 8:09:55 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Why?
10-2-Asteroid-7-points-Rank.sm (28 KiB) downloaded 34 time(s).
5-7-points.png
#9 Posted: 11/3/2023 1:06:29 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Why?



Hi. Due to numerical errors. These ranks are evaluated with numerical procedures. That means that for some cases they must necessarily fail. You can introduce some kind of tolerance in the function. Maple also fails in this example.

Clipboard01.png

This shows that the rank function that is executed is that of maple.

Clipboard02.png

However, I don't know how to call Maxima's rank function, it is not in the Takeover options.

Here some notes about how to handle a little better the issue.

10-2-Asteroid-7-points-Rank.sm (35 KiB) downloaded 30 time(s).

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 11/3/2023 8:24:00 AM
#10 Posted: 11/3/2023 7:13:27 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Maxima gives the correct answer. Yet I think that maple is not to blame, because maple(rank(M)) sends 4 to maple. At least this happens with Maxima(rank(M)).

In Maxima I have a workaround for such cases. First I convey the definition of M to Maxima and then call rank(M). The format "$...§" conveys everything inside the markup as verbatim expression to Maxima. without giving SMath the chance to interfere.

Should not be too complicated to add rank() to the takeover candidates.

2023-11-03 13_03_03-SMath Solver 1.0.8477 - [10-2-Asteroid-7-points-Rank (1).sm_].png
10-2-Asteroid-7-points-Rank _Kr.sm (40 KiB) downloaded 36 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
Valery Ochkov 11/3/2023 7:17:00 PM, sergio 11/3/2023 11:10:00 PM
#11 Posted: 11/4/2023 12:03:02 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi Martin.

Wrote

Maxima gives the correct answer ...



Nope. The issue is about a matrix C=augment( A,b ), where b is a column vector so, it must to have the same rank as A.

Clipboard01.png

Wrote

... Yet I think that maple is not to blame, because maple(rank(M)) sends 4 to maple. At least this happens with Maxima(rank(M)).



Either. In some way maple holds the rank function and evaluates it on its own kernel. Actually, the example with the matrix M is for show that.

Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 11/5/2023 3:08:00 AM
  • New Posts New Posts
  • No New Posts No New Posts