Skip to main content
4-Participant
September 20, 2016
Solved

Build New Matrix by Selecting Specific Columns of Another Matrix

Please help with writing a program to do the following.

Also, if "A" matrix is n rows, "B" matrix will always be n x n.

23-Emerald V
September 21, 2016

Here's one way ...

8 replies

23-Emerald V
September 21, 2016

Here's one way ...

Translate
hriek4-ParticipantAuthor
4-Participant
September 21, 2016

Thank you StuartBruff.

However the following won't work for me, but it's not like I need it anyway.

I get the error "this value must be an integer" for 'k'

Translate
1-Visitor
September 21, 2016

Get rid of the in-line evaluation of k and it should work.

By using the in-line evaluation, you are unknowingly converting k from a range variable to an array.

Translate