Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Extract non-consecutive rows and columns from a ma...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-21-2015
11:09 PM

03-21-2015
11:09 PM

Hi, everyone,

Suppose I have a 13 by 13 matrix, (shown in attachment),

what I want to do is to extract its 4th-5th, 7th, 9th-10th rows and columns to create a 5 by 5 matrix.

So far I only know that the function "submatrix" works with extracting consecutive rows and columns,

so how to extract non consecutive rows and columns?

Looking forward to hearing from you,

Thank you very much

Best

Shawn

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-22-2015
04:27 AM

03-22-2015
04:27 AM

submatrix at first and than stack function!

3 REPLIES 3

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-22-2015
04:27 AM

03-22-2015
04:27 AM

submatrix at first and than stack function!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-22-2015
05:06 AM

03-22-2015
05:06 AM

Re: Extract non-consecutive rows and columns from a matrix

... Columns first then rows is probably the way to do it.

Although with so few elements, it might be just as convenient to use a program to loop over the desired row and columns and build up the new matrix one element at a a time.

Stuart

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-22-2015
01:53 PM

03-22-2015
01:53 PM

Re: Extract non-consecutive rows and columns from a matrix

I would the column operator with the augment function, followed by the row operator with the stack function.