Prev: NPN transfer function and frequncy response using simulink
Next: how can I convert video in my decoment to frames each frames alone in one figure
From: Oleg Komarov on 26 Jun 2010 04:48 "Vasilis Kapetanidis" <shadeborg(a)yahoo.com> wrote in message <i0496a$6h6$1(a)fred.mathworks.com>... > hello to the community, > > I have ended up with a cell array that looks like this: > > A = > [5x1 double] [5x30 char] > > what I would like to do is expand each of the two elements (note that these matrices have the same number of rows) and get the same result as in: > > {A{1,1}(1) A{1,2}(1); > A{1,1}(2) A{1,2}(2); > A{1,1}(3) A{1,2}(3); > A{1,1}(4) A{1,2}(4); > A{1,1}(5) A{1,2}(5)} > > but do it for a general case with N rows in the above matrices instead of just 5. Is there a one-liner way to do it? (I want to avoid a for-loop) > > thanks! > % Create example input A = {rand(5,1), char(repmat(121:150,5,[]))}; [num2cell(A{1,1}), cellstr(A{1,2})] Oleg |