1 страниц (5 вхождений)
Matrices in a matrix - Сообщения
#1 Опубликовано: 07.06.2011 16:42:38
I was curious how to embed matrices in a matrix and access an element of it.
X[2 gives me the second row matrix.
(X[2)[1,2 gives me the middle element of the second row.
Works with functions too.
[LIVE width=242 height=347]http://smath.info/live/?file=2839[/LIVE]
X[2 gives me the second row matrix.
(X[2)[1,2 gives me the middle element of the second row.
Works with functions too.
[LIVE width=242 height=347]http://smath.info/live/?file=2839[/LIVE]
Ed
#2 Опубликовано: 08.06.2011 02:36:28
Hello Ed,
Yes, that is possible in SMath. One can have nested-embedded matrices. Andrey introduced that in one of the previous releases. I think he intended to apply some operations with so called "block matrices". It seems that there is some additional work to be done regarding this. It depends on Andrey's opinion about that.
For instance, take a closer look to this example.
[LIVE width=439 height=308]http://smath.info/live/?file=2841[/LIVE]
Did you notice how transpose operator works with nested matrices?
On the other hand, we should take care of the multiple indexing here in order not to make mistakes.
Regards,
Radovan
Yes, that is possible in SMath. One can have nested-embedded matrices. Andrey introduced that in one of the previous releases. I think he intended to apply some operations with so called "block matrices". It seems that there is some additional work to be done regarding this. It depends on Andrey's opinion about that.
For instance, take a closer look to this example.
[LIVE width=439 height=308]http://smath.info/live/?file=2841[/LIVE]
Did you notice how transpose operator works with nested matrices?
On the other hand, we should take care of the multiple indexing here in order not to make mistakes.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
Andrey Ivashov 08.06.2011 05:36:00
#3 Опубликовано: 08.06.2011 12:31:49
Radovan,
I'm not able to sub element an element thats why I found I had to enclose the submatrix in parens (X.2)[1,2 to get it to work. I'm using 0.89. Perhaps in the beta versions you can sub element an elemnt of a matrix X[2[1,2.
I'm not able to sub element an element thats why I found I had to enclose the submatrix in parens (X.2)[1,2 to get it to work. I'm using 0.89. Perhaps in the beta versions you can sub element an elemnt of a matrix X[2[1,2.
Ed
#4 Опубликовано: 08.06.2011 15:49:32
Hello Ed,
At the moment, we should take care when using this multiple indexing. You could use parenthesis, but you do not need to do that if you use space key {SPACE}. For instance you should use X[2{SPACE}[1,2 instead of X[2[1,2. If we do not take care of this {SPACE} thing, there would actually error be issued - sometimes a strange one, for instance - that we try to display some large or small number not supported by Int32 ??? . There would be no problem as long as we use {SPACE} to enclose the needed parts of the variable inside the editing line (where invisible parenthesis would actually be). As I said, I think there are some additional efforts needed by Andrey to resolve these ambiguities.
I hope I made myself understood. If not I would give some pictures in the subsequnt posts (not able at the moment).
Regards,
Radovan
At the moment, we should take care when using this multiple indexing. You could use parenthesis, but you do not need to do that if you use space key {SPACE}. For instance you should use X[2{SPACE}[1,2 instead of X[2[1,2. If we do not take care of this {SPACE} thing, there would actually error be issued - sometimes a strange one, for instance - that we try to display some large or small number not supported by Int32 ??? . There would be no problem as long as we use {SPACE} to enclose the needed parts of the variable inside the editing line (where invisible parenthesis would actually be). As I said, I think there are some additional efforts needed by Andrey to resolve these ambiguities.
I hope I made myself understood. If not I would give some pictures in the subsequnt posts (not able at the moment).
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Опубликовано: 08.06.2011 19:15:22
Radovan,
I tried your {SPACE} and it works with 0.89 Stable. I didn't know about this. Thanks.
I tried your {SPACE} and it works with 0.89 Stable. I didn't know about this. Thanks.
Ed
1 страниц (5 вхождений)
-
Новые сообщения
-
Нет новых сообщений