cell
cell(dims)
Construct an uninitialized cell array (heterogeneous array). dims
can be either a tuple or a series of integer arguments.
Examples
-
Create an uninitialized cell array with a tuple dimension:
julia> cell((2, 3)) 2×3 Array{Any,2}: #undef #undef #undef #undef #undef #undef
This example creates a 2x3 cell array with uninitialized elements.
-
Create an uninitialized cell array with individual dimensions:
julia> cell(2, 3) 2×3 Array{Any,2}: #undef #undef #undef #undef #undef #undef
It creates the same 2x3 cell array using individual dimensions as arguments.
- Create a 1D cell array:
julia> cell(4) 4-element Array{Any,1}: #undef #undef #undef #undef
This example creates a 1D cell array with 4 uninitialized elements.
Common mistake example:
julia> cell(-1)
ERROR: ArgumentError: number of dimensions must be non-negative
In this example, a negative value is provided as the dimensions argument. The dimensions argument must be non-negative. Always ensure that the dimensions passed to cell
are valid.
See Also
abs2, beta, binomial, ceil, cell, cross, ctranspose, ctranspose!, cummin, cumprod, cumprod!, cumsum, cumsum!, cumsum_kbn, div, divrem, eigfact, eigfact!, eigmin, eps, erf, erfc, erfcinv, erfcx, erfi, erfinv, exp, exp10, exp2, expm1, exponent, factor, factorial, factorize, floor, gcd, invmod, log, log10, log1p, log2, logspace, max, min, mod, mod1, modf, next, nextpow, nextprod, num, primes, primesmask, prod, realmin, sqrt, sum!, sumabs, sumabs!, sumabs2, sumabs2!,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.