1 pagine (4 elementi)
Matrix Mirror - Matrix Mirror - Messaggi
Smath does not support reverse cols order in "submatrix".
Alternately, here is the module. Read more in the attached.
Jean

Utilities Matrix Mirror Exercise.sm (19,08 KiB) scaricato 1417 volta(e).
Alternately, here is the module. Read more in the attached.
Jean

Utilities Matrix Mirror Exercise.sm (19,08 KiB) scaricato 1417 volta(e).
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
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!"
You even don't have to wait for the vector indices, at least for the mirror.
See here

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.
See here
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 utenti hanno apprezzato questo post
frapuano 09/09/2016 14:23:00
WroteThe 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)

С уважением,
Михаил Каганский
1 utenti hanno apprezzato questo post
NDTM Amarasekera 11/09/2016 15:38:00
1 pagine (4 elementi)
- Nuovi post
- Nessun nuovo post