Matrix Mirror

Matrix Mirror - Matrix Mirror - Poruke

#1 Objavljeno: 9. 9. 2016. 09:29:52
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Smath does not support reverse cols order in "submatrix".
Alternately, here is the module. Read more in the attached.

Jean

Matrix Mirror.gif

Utilities Matrix Mirror Exercise.sm (19,08 KiB) preuzeto 1450 put(ova).
#2 Objavljeno: 9. 9. 2016. 11:06:05
Radovan Omorjan

Radovan Omorjan

325 svidjanja i 1 nesvidjanja u 2.052 postova.

Grupa: Moderator

I think this is remedied as well with the recent vector indices.
Moreover, I think we can forget about submatrix() function now

http://smath.info/cloud/worksheet/uRMs2euU

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Objavljeno: 9. 9. 2016. 12:33:23
Martin Kraska

Martin Kraska

1.369 svidjanja u 2.283 postova.

Grupa: Moderator

You even don't have to wait for the vector indices, at least for the mirror.

See here

index2.PNG

The mirror implementation is straightforward to understand (transpose, reverse, transpose)

The diagonal is a nasty indexing trick, which is that far from paper and pencil notation that it can't be recommended unless you want to obfuscate your algorithm (then best use excel). You just square the row/column index range elements to access the diagonal elements in linear indexing.
This, however, uses the vector index feature.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 korisnika je svidelo ovu objavu
frapuano 9. 9. 2016. 14:23:00
#4 Objavljeno: 10. 9. 2016. 03:38:55
Mike Kaganski

Mike Kaganski

184 svidjanja u 434 postova.

Grupa: User

Wrote

The diagonal is a nasty indexing trick, which is that far from paper and pencil notation that it can't be recommended unless you want to obfuscate your algorithm (then best use excel). You just square the row/column index range elements to access the diagonal elements in linear indexing.
This, however, uses the vector index feature.



diagonal(M):el(M,(range(0,(rows(M)-1)))*(rows(M)+1)+1)

diag.png
С уважением, Михаил Каганский
1 korisnika je svidelo ovu objavu
NDTM Amarasekera 11. 9. 2016. 15:38:00
  • Novi postovi
  • Nema novih postova