Skip to main content
1-Visitor
January 30, 2018
Solved

Problem with merging vectors

Hi all, I have several column vectors that I need them to be merged into a one big column vector. The problem is that as they have several dimensions, Mathcad add zeros to match their dimension before merging them. The zeros make errors in calculations. I wonder how I can avoid these zeros? Many thanks.

Werner_E
Werner_EAnswer
25-Diamond I
January 30, 2018

How about this:

bild.PNG

 

5 replies

23-Emerald I
January 30, 2018

try:

 

stack(y1,y2,y3)

 

Translate
mzarrabi1-VisitorAuthor
1-Visitor
January 30, 2018

Thank you for your response, but I want to use it in a loop in a way that regardless of the number of vectors (y), the function can automatically do that. For example, if there are 10 different vectors (y), there would be no need to change the function to work. I hope you find my explanation clear.   Best.

Translate
Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
January 30, 2018

How about this:

bild.PNG

 

Translate