How can I make a vector from a matrix?
Show older comments
Hi everybody,
I wanna transform an entire matrix to a vector, I need take all the columns from the first value until a previously defined value and after that concatenate into a vector to plot. For example:
A =
1 2 3
4 5 6
7 8 9
0 10 11
0 12 13
0 14 0
0 0 0
I need the answer: A= [1 4 7 2 5 8 10 12 14 3 6 9 11 13]
I know the positions where the 0's start.
Someone can help me please?
regards.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!