Not quadrat matrix

Not quadrat matrix - 消息

#1 已发布: 2023/11/1 12:37:35
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

The work with not quadrat matrix.
How better solve?
See please the attached sm-file.
1-Asteroid-5-Points.sm (25.84 KiB)已下载 1480 次。
#2 已发布: 2023/11/1 23:19:48
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: 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.41 KiB)已下载 1439 次。

#3 已发布: 2023/11/2 00:18:02
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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.71 KiB)已下载 1499 次。

Best regards.
Alvaro.

1位用户喜欢此帖子
Valery Ochkov 2023/11/2 01:46:00
#4 已发布: 2023/11/2 02:52:03
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

Thanks Alvaro.
10-2-Asteroid-7-points.sm (21.89 KiB)已下载 1457 次。

#5 已发布: 2023/11/2 03:27:28
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

A little more compact.

Clipboard03.png

Best regards.
Alvaro.
1位用户喜欢此帖子
Valery Ochkov 2023/11/2 11:47:00
#6 已发布: 2023/11/2 12:03:29
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

Thanks Alvaro.
New problem with Ranks
10-2-Asteroid-7-points-Rank.sm (16.06 KiB)已下载 1488 次。
10-2-Asteroid-7-points-Rank.png
#7 已发布: 2023/11/2 14:58:52
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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.23 KiB)已下载 1448 次。

Best regards-
Alvaro.
2位用户喜欢此帖子
sergio 2023/11/2 16:00:00, Valery Ochkov 2023/11/2 20:09:00
#8 已发布: 2023/11/2 20:09:55
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

Why?
10-2-Asteroid-7-points-Rank.sm (28.74 KiB)已下载 1515 次。
5-7-points.png
#9 已发布: 2023/11/3 01:06:29
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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.26 KiB)已下载 1495 次。

Best regards.
Alvaro.
1位用户喜欢此帖子
Valery Ochkov 2023/11/3 08:24:00
#10 已发布: 2023/11/3 19:13:27
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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.03 KiB)已下载 1487 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
2位用户喜欢此帖子
Valery Ochkov 2023/11/3 19:17:00, sergio 2023/11/3 23:10:00
#11 已发布: 2023/11/4 00:03:02
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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位用户喜欢此帖子
Valery Ochkov 2023/11/5 03:08:00
  • 有新帖
  • 无新帖