Re: Cell Array



"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> writes:

> Hello,
>
> I am creating a cell array in two different ways:
> C_1 = {1,1,1,1;1,1,1,1;1,1,1,1;1,1,1,1}
>
> And
>
> A=1
> B=repmat(A, 4, 4);
> C_2={B}
>
> When I write C_1 I see the cell elements and when I write C_2 I see [4x4
> double]. Why? Is there any difference the way I create both cells.

C_1 is a 4x4 cell array, where each element is a 1x1 matrix = 1.
C_2 is a 1x1 cell array, where the single element is a 4x4 matrix.


--
Peter Boettcher <boettcher@xxxxxxxxxx>
MIT Lincoln Laboratory
MATLAB FAQ: http://www.mit.edu/~pwb/cssm/
.



Relevant Pages

  • Re: probability
    ... thx a lot! ... but i have to convert the cell array to a vector. ... > % ...and show it's realization ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • anonymous parameters
    ... If I assign functions to a cell array to calculate averages from rows ... Obviously this does not work or I wouldnt be asking - but does anyone ... Rob ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: how to locate some specific value in a cell ar
    ... Zhihua LI wrote: ... > i have a cell array X like this: ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Class arrays
    ... I realize this may be a fairly easy question to answer but none the ... I've created a cell array 2x9x8 and I want to make the cells in the ... characters. ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Difficulty in finding position from a text file
    ... % C is a cell array of cell arrays, each containing a string. ... Prev by Date: ...
    (comp.soft-sys.matlab)