cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

5-Regular Member

## How to append elements of two or more vectors

I am trying to create a vector with values like this

1, 2, 3, 4, 4.2, 4.4, 4.6, 4.8, 5, 6, 7, 8

In practice there will be many more values and it wouldn't be practical to enter them one at a time. If I create three vectors like this

v1 := 1,2..4

v2 = 4.2,.4...4.8

v3 = 5,6..8

Is there some way I can combine them into a single vector?

Also, I would like the resulting vector to be a row vector rather than a column vector (if that is possible).

1 ACCEPTED SOLUTION

Accepted Solutions
18-Opal
(To:PaulN)
6 REPLIES 6
18-Opal
(To:PaulN)

5-Regular Member
(To:ttokoro)
Amazing ... I would never have found that. Many thanks
5-Regular Member
(To:ttokoro)

I know I marked this topic as solved but can I add a follow-up question (about length, rows and cols) or should I start a new topic

24-Ruby V
(To:PaulN)

@PaulN wrote:

I know I marked this topic as solved but can I add a follow-up question (about length, rows and cols) or should I start a new topic

Thats up to you. If you think that your question still fits the topic its OK to add your follow-up question right here.

On the other hand a new thread may draw more attention and attract more people than an already solve topic.

20-Turquoise
(To:PaulN)

Hi

rows from the rows() function with the matrix or vector name inside the brackets

cols from the cols() function with the matrix name inside the brackets

Cheers

Terry

20-Turquoise
(To:terryhendicott)

Hi,

rows() and cols() allow you to find how many.

To extract rows and columns there are two possibilities

One is the row and column extractor/inserter functions

The second possibility is the submatrix() function you can look up in help

Cheers

Terry

Announcements