Effacer les filtres
Effacer les filtres

CAT arguments dimensions are not consistent. How to solve this problem?

3 vues (au cours des 30 derniers jours)
MatlabFan
MatlabFan le 11 Mar 2013
Hi,
I get the error: CAT arguments dimensions are not consistent. when running the portion of my code:
f=@(c) reshape(c.',1,[]);
A=cell2mat(cellfun(f,A(:),'uni',0));
Any suggestions? A is a 3-D array.
Thanks.

Réponse acceptée

Cedric
Cedric le 11 Mar 2013
You might have a cell in the cell array A whose content doesn't have the same number of elements as the others, which prevents the CAT operation in CELL2MAT. You can check it out with:
>> cellfun(@numel, A)
If you don't get an array filled with one, unique value, you cannot use CELL2MAT.

Plus de réponses (0)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by