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
Guest  
#1 Posted : 17 November 2010 03:36:28(UTC)
Guest

Rank: Guest

Groups: Guests
Joined: 11/07/2008(UTC)
Posts: 27

This is a reply/feature request in response to flybacks matrix question from October 25, 2010

If Andrey could add a new matrix function to be used similar to the transpose function T
but using the identifier ∀ (logic symbol: "For each" )

Then, a new form of matrix calculations could be an operation between two
matrices, but performed element by element with a result of appropriate matrix size without using For loops.


ex 1:

A := [1 2 3] B := [4 5 6]

.∀....∀
A.*B = [4 10 18]

As a default, if the matrices do not match size, just ignore the elements with no partner and
make the result matrix as big as the larger matrix and place unpaired elements in result matrix
unchanged. ex 2:

A := [1 2 3]

B := [4 5
.........6 7
.........8 9]

.∀....∀
A +B = [5 7 3
.............6 7 0
.............8 9 0]

Using index subranges, we could change the elemental alignment. ex 3:

.∀................∀
A +B...............= [7 2 3
.........[2..3,1].......8 0 0]

where the submatrix extracted from B is

[6
.8]

Using augment and stack, we could synthesize a different matrix from the
the elements of A in order to realign the way the elements in A pair up with the elements in B.
However, a more sophisticated method shown below would make desired alignments and also provide
desired result matrix dimensions (for example, realigning A to the Second row of B as ex. 3, but still
having a 3x3 matrix resulting as in example 2 and no submatrix extraction. ex 4:

.∀.............∀
A +B...............= [4 5 0
........[Δ-1]...........7 9 3]
...........................8 9 0]

where the Δ-1 implies a realignment of the rows of B so that the 2nd row decrements to the first row
which pairs up with the elements of A and the first and third rows go along for the ride. A 0Δ1 would
have the rows of B increment by one and a new virtual first row of zeros would be created (stacking
an extra row to make a 4 row matrix)

Edited by user 17 November 2010 04:57:45(UTC)  | Reason: corrected second row ex 4

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

Guest  
#2 Posted : 17 November 2010 04:54:37(UTC)
Guest

Rank: Guest

Groups: Guests
Joined: 11/07/2008(UTC)
Posts: 27

Made a mistake in second row result in ex 4:

[7 9 3]
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.