how to solve Conversion to cell from double is not possible

i have the following cell array F=
[710x1 double]
[711x1 double]
[711x1 double]
[713x1 double]
my objective is to know the number of elements in each cell array and finally get resul looks like
[710]
[711]
[711] ...
for this i used the following code
for i=1:length(F);
f(i)=numel(f{i,1});
end
but i get the Warning: Number of elements exceeds maximum flint 2^53-1.
The result may be inaccurate.
*Conversion to cell from double is not possible.*
Any solution Ps. Thanks!

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 12 de Jul. de 2015
Editada: Azzi Abdelmalek el 12 de Jul. de 2015
F={1;1:2;1:3;5:10}
f=zeros(numel(F),1);
for i=1:numel(f);
f(i)=numel(F{i});
end
f
Or simply
f=cellfun(@numel,F)

Más respuestas (0)

Categorías

Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Jul. de 2015

Comentada:

el 12 de Jul. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by