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

Build New Matrix by Selecting Specific Columns of Another Matrix

  • September 20, 2016
  • 1 reply
  • 4455 views

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.

Best answer by StuartBruff

Here's one way ...

1 reply

23-Emerald V
September 21, 2016

Here's one way ...

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'

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.