cell2mat with 1* 1 cell array

2 vues (au cours des 30 derniers jours)
bugatti79
bugatti79 le 22 Oct 2013
Commenté : Azzi Abdelmalek le 24 Oct 2013
Folks,
I have A{ii} which is a cell array 1*1 containing 18*9 matrix. I atttempt to convert to a matrix using B=cell2mat(A) but I get error stating
Cell contents reference from a non-cell array object.
I cannot change A{ii} to A(ii) is it violates
A(I) = B, the number of elements in B and
I must be the same.
Any ideas? Regards B
  2 commentaires
Matt Kindig
Matt Kindig le 22 Oct 2013
Modifié(e) : Matt Kindig le 22 Oct 2013
What about
B = cell2mat(A{ii})
bugatti79
bugatti79 le 22 Oct 2013
Hi Matt,
This is what i had, doesnt work....

Connectez-vous pour commenter.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 22 Oct 2013
Type
A
whos A
what did you get?
  13 commentaires
bugatti79
bugatti79 le 24 Oct 2013
C needs to be a matrix not a single numeric value...
Azzi Abdelmalek
Azzi Abdelmalek le 24 Oct 2013
Then just use
D{ii}= i.*n.*B{ii}.*C

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by