MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > Combine variable length vectors into one vector 

Subject: Combine variable length vectors into one vector From: Stan Date: 13 Aug, 2012 23:18:11 Message: 1 of 21 
Hi, 
Subject: Combine variable length vectors into one vector From: dpb Date: 14 Aug, 2012 00:16:52 Message: 2 of 21 
On 8/13/2012 6:18 PM, Stan wrote: 
Subject: Combine variable length vectors into one vector From: Stan Date: 14 Aug, 2012 01:12:11 Message: 3 of 21 
^^^ 
Subject: Combine variable length vectors into one vector From: dpb Date: 14 Aug, 2012 02:06:19 Message: 4 of 21 
On 8/13/2012 8:12 PM, Stan wrote: 
Subject: Combine variable length vectors into one vector From: Stan Date: 14 Aug, 2012 02:46:10 Message: 5 of 21 
Ah, your vertcat command suggestion is just what I needed. 
Subject: Combine variable length vectors into one vector From: dpb Date: 14 Aug, 2012 04:26:23 Message: 6 of 21 
On 8/13/2012 9:46 PM, Stan wrote: 
Subject: Combine variable length vectors into one vector From: dpb Date: 14 Aug, 2012 14:43:37 Message: 7 of 21 
On 8/13/2012 11:26 PM, dpb wrote: 
Subject: Combine variable length vectors into one vector From: Stan Date: 16 Aug, 2012 16:06:08 Message: 8 of 21 
^^^^Ah, thanks. 
Subject: Combine variable length vectors into one vector From: dpb Date: 16 Aug, 2012 18:43:01 Message: 9 of 21 
On 8/16/2012 11:06 AM, Stan wrote: 
Subject: Combine variable length vectors into one vector From: dpb Date: 17 Aug, 2012 01:50:19 Message: 10 of 21 
On 8/16/2012 1:43 PM, dpb wrote: 
Subject: Combine variable length vectors into one vector From: Stan Date: 17 Aug, 2012 16:07:10 Message: 11 of 21 
With that code, you would still have the same problem that I had. Suppose you had 2 dir() commands  d = () and c = (). The first dir() returned 4 files and the second dir() returned 2 files. Well, if you used the same cell array, M, to store the file names, then M would first contain 4 file names, as it should. But if you then try to overwrite the contents of M will the file names from the second dir() command, only the first two file names will be overwritten: 
Subject: Combine variable length vectors into one vector From: Bruno Luong Date: 17 Aug, 2012 17:49:14 Message: 12 of 21 
"Stan" wrote in message <k0lq7e$3do$1@newscl01ah.mathworks.com>... 
Subject: Combine variable length vectors into one vector From: dpb Date: 17 Aug, 2012 18:54:01 Message: 13 of 21 
On 8/17/2012 11:07 AM, Stan wrote: 
Subject: Combine variable length vectors into one vector From: Stan Date: 17 Aug, 2012 20:33:14 Message: 14 of 21 
What I was doing: 
Subject: Combine variable length vectors into one vector From: Bruno Luong Date: 17 Aug, 2012 21:31:16 Message: 15 of 21 
"Stan" wrote in message <k0m9qa$53f$1@newscl01ah.mathworks.com>... 
Subject: Combine variable length vectors into one vector From: dpb Date: 17 Aug, 2012 21:39:47 Message: 16 of 21 
On 8/17/2012 3:33 PM, Stan wrote: 
Subject: Combine variable length vectors into one vector From: dpb Date: 18 Aug, 2012 00:25:43 Message: 17 of 21 
On 8/17/2012 4:39 PM, dpb wrote: 
Subject: Combine variable length vectors into one vector From: Bruno Luong Date: 18 Aug, 2012 06:26:05 Message: 18 of 21 
dpb <none@non.net> wrote in message <k0mneb$gtg$1@speranza.aioe.org>... 
Subject: Combine variable length vectors into one vector From: Bruno Luong Date: 18 Aug, 2012 06:30:16 Message: 19 of 21 
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message 
Subject: Combine variable length vectors into one vector From: Bruno Luong Date: 18 Aug, 2012 07:43:14 Message: 20 of 21 
To complement my code in post #15, there is no need to call for specific function, 
Subject: Combine variable length vectors into one vector From: dpb Date: 18 Aug, 2012 13:36:31 Message: 21 of 21 
On 8/18/2012 1:26 AM, Bruno Luong wrote: 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.