Get Help

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
- :
- How to create a matrix from certain variables

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

Showing results for

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

04-26-2013
09:23 PM

04-26-2013
09:23 PM

Hello,

if I have set of variables such as:

a0=3 , a1=5 , a2=6 , a3= 9 , a4=2

I want to creat a matrix such as:

n= number of rows,

if I put n=3, the matrix will include a0,a1 and a2 only, the result will be like this:

M=[3

5

6]

if I put n=4, the matrix will include a0,a1,a2 and a3 only, the result will be like this:

M=[3

5

6

9]

Thank you in advance.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

04-27-2013
03:56 AM

04-27-2013
03:56 AM

or do you have one of those in mind?

4 REPLIES 4

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

04-27-2013
01:32 AM

04-27-2013
01:32 AM

Re: How to create a matrix from certain variables

May be so:

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

04-27-2013
03:56 AM

04-27-2013
03:56 AM

or do you have one of those in mind?

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

04-27-2013
04:50 AM

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

04-27-2013
05:08 AM

04-27-2013
05:08 AM

Re: How to create a matrix from certain variables

Valery Ochkov wrote:

I t is the diag function?

As you can see I used the diag function in the definition of subM, but A_B seems to be after some kind of extraction/subvector kind of thing.

I'm not absolutely sure but from his description I think that my "subv" is what he is searching for.