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 OchkovVF  
#1 Posted : 01 November 2023 18:37:35(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 345
Man
Russian Federation

Was thanked: 26 time(s) in 25 post(s)
The work with not quadrat matrix.
How better solve?
See please the attached sm-file.
1-Asteroid-5-Points.sm (26kb) downloaded 14 time(s).

Edited by user 01 November 2023 19:02:45(UTC)  | Reason: Not specified

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

Offline Jean Giraud  
#2 Posted : 02 November 2023 05:19:48(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
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 (35kb) downloaded 2 time(s).

Offline Razonar  
#3 Posted : 02 November 2023 06:18:02(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,361
Uruguay

Was thanked: 822 time(s) in 520 post(s)
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 (28kb) downloaded 3 time(s).

Best regards.
Alvaro.

thanks 1 user thanked Razonar for this useful post.
on 02/11/2023(UTC)
Offline OchkovVF  
#4 Posted : 02 November 2023 08:52:03(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 345
Man
Russian Federation

Was thanked: 26 time(s) in 25 post(s)
Thanks Alvaro.
10-2-Asteroid-7-points.sm (22kb) downloaded 6 time(s).

Offline Razonar  
#5 Posted : 02 November 2023 09:27:28(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,361
Uruguay

Was thanked: 822 time(s) in 520 post(s)
A little more compact.

Clipboard03.png

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 02/11/2023(UTC)
Offline OchkovVF  
#6 Posted : 02 November 2023 18:03:29(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 345
Man
Russian Federation

Was thanked: 26 time(s) in 25 post(s)
Thanks Alvaro.
New problem with Ranks
10-2-Asteroid-7-points-Rank.sm (17kb) downloaded 3 time(s).
10-2-Asteroid-7-points-Rank.png
Offline Razonar  
#7 Posted : 02 November 2023 20:58:52(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,361
Uruguay

Was thanked: 822 time(s) in 520 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
... 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 (20kb) downloaded 5 time(s).

Best regards-
Alvaro.
thanks 2 users thanked Razonar for this useful post.
on 02/11/2023(UTC),  on 03/11/2023(UTC)
Offline OchkovVF  
#8 Posted : 03 November 2023 02:09:55(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 345
Man
Russian Federation

Was thanked: 26 time(s) in 25 post(s)
Why?
10-2-Asteroid-7-points-Rank.sm (29kb) downloaded 5 time(s).
5-7-points.png
Offline Razonar  
#9 Posted : 03 November 2023 07:06:29(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,361
Uruguay

Was thanked: 822 time(s) in 520 post(s)
Originally Posted by: OchkovVF Go to Quoted Post
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 (36kb) downloaded 4 time(s).

Best regards.
Alvaro.

Edited by user 03 November 2023 07:52:42(UTC)  | Reason: SMath with notes added.

thanks 1 user thanked Razonar for this useful post.
on 03/11/2023(UTC)
Offline mkraska  
#10 Posted : 04 November 2023 01:13:27(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1127 time(s) in 723 post(s)
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 (41kb) downloaded 3 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 04/11/2023(UTC),  on 04/11/2023(UTC)
Offline Razonar  
#11 Posted : 04 November 2023 06:03:02(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,361
Uruguay

Was thanked: 822 time(s) in 520 post(s)
Hi Martin.

Originally Posted by: mkraska Go to Quoted Post
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

Originally Posted by: mkraska Go to Quoted Post
... 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.
thanks 1 user thanked Razonar for this useful post.
on 05/11/2023(UTC)
Users browsing this topic
Guest
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.