From: us on
"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!
>

a hint:

help num2cell;
help cellstr;

us
 | 
Pages: 1
Prev: Duplicate directory name error
Next: china