Store for loop vector output into one column
1 view (last 30 days)
Show older comments
Hi, I want to take the vector outputs of my for loop (which are 4x1) and store them into one big column vector. I got it to form a rectangular matrix, but I don't know how to make it into one big column.
Thanks
0 Comments
Answers (1)
Sean de Wolski
on 8 Sep 2014
doc reshape
Example:
m = magic(4)
v = reshape(m,[],1)
Or if nothing fancy is needed
v = m(:)
0 Comments
See Also
Categories
Find more on Loops and Conditional Statements 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!