Didn't get much time to play last night.
So - if anyone would like to play along. Any thoughts/comments/ideas/help...
This is some simple code to create / delete / set values in / get values / display a matrix.
There is a multiply - but it just creates the result matrix (and I'm not sure I have the dimensions right (h2 by w1 which are equal) - I haven't done any of the multiply code. (Multiply rows by columns and sum) There is no error checking - so if you do setvalue(matrix, 0, 10000) on a 3x3 matrix it will overwrite something.
Multiply returns 0 if width1 != height2 (which is a requirement for a multiply)
Create also returns 0 if can't create (no memory) - everywhere needs to check...
I've used an Arduino - but esp32 would be better (much more memory)
Note it should work on Arduino or esp32 - but won't work on small PICs which don't support malloc.
I've used 16 bit integers as values in the matrix. Could change to float easily.
Martin