Submatrix

18 views
Skip to first unread message

Aron Sogor

unread,
Oct 13, 2021, 5:28:41 PM10/13/21
to gonum-dev
Hi,

First, I am new to gonum and it is a fantastic tool Thank You All!
Second I am new to gonum and so if there are better places to ask questions, please point me there.

I am wondering if there is a way or even a preferred way to accomplish the following task:

Define a matrix 4x4  [1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4] and define a another matrix of get a view to like a 2x2 matrix starting at x=1,y=1 that would give me [2,2,3,3] so if I change the values in the new view to [3,3,2,2] the original matrix turns into [1,1,1,1,2,3,3,2,3,2,2,3,4,4,4,4].

Getting the Raw []float64 sort of allows for this already AFAIK. And I did see long time ago conversations about submatrixes. 

Please any pointer is greatly appriciated!

Aron

Brendan Tracey

unread,
Oct 13, 2021, 5:44:55 PM10/13/21
to Aron Sogor, gonum-dev
Slice should be the function you are looking for


--
You received this message because you are subscribed to the Google Groups "gonum-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gonum-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gonum-dev/61f802d1-c5c2-4853-ae92-423094613307n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages