Algebrite icon indicating copy to clipboard operation
Algebrite copied to clipboard

function for creating augmented matrix

Open anurupmitra opened this issue 7 years ago • 2 comments
trafficstars

Hi,

I could not see any obvious (read straight-forward) method to create an augmented matrix - either by adding a block of rows OR a block of columns.

This would be invaluable.

Thanks and Regards Anurup

anurupmitra avatar Dec 02 '17 11:12 anurupmitra

Hi Anurup,

ok, say, C = A|B

short version:

  • retaining the "block" information (i.e. symbolically keeping track that C is a block matrix) is probably hard
  • just copying a matrix content to the side of another matrix would be much easier, but all further symbolic handling of the block parts would be lost

longer version:

...the symbolic part is tricky, so if one says C = A|B, then we need to define how "|" behaves for all the operations... that could end up to be quite complicated, see for example https://scicomp.stackexchange.com/questions/14164/symbolic-computations-with-block-matrices-in-maple for how Maple and SymPy do it.

The alternative is to "just" create a function that copies a matrix to the side of another one, so all "symbolic" information about "C" being constituted by "A" and "B" is lost.

That could be made to work more quickly, but I need to think about good names and possible gotchas...

If you have further thoughts let me know...

davidedc avatar Dec 02 '17 17:12 davidedc

Hi Davide,

Thank you for your reply and sorry for the delay in getting back to you.

I'll be selfish - for my personal usage case - the last option would be most useful. In fact, I need a glorified addRow(s) and addCol(s) function. The symbolic information is not important. The new matrices that will be formed are.

Thanks again for your great work!

Regards Anurup

anurupmitra avatar Dec 04 '17 18:12 anurupmitra