Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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).
Solved! Go to Solution.
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
@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.
So its your choice.
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
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