Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Vector concatenation without using a for loop (MATLAB)

Tags:
  1. Jan 22, 2014 #1
    I have a variable number of vectors to concatenate in my Matlab model. Is there a way to do this without a for loop? The number will depend upon input parameters. Suggestions.
     
  2. jcsd
  3. Jan 22, 2014 #2
    If they are stored in a matrix (as then tend to be when read from a file with e.g. dlmread), you can reshape the matrix into a vector with the cleverly named command 'reshape'.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Vector concatenation without using a for loop (MATLAB)
  1. Matlab concatenation (Replies: 2)

Loading...