필터 지우기
필터 지우기

cell2mat with 1* 1 cell array

조회 수: 3 (최근 30일)
bugatti79
bugatti79 2013년 10월 22일
댓글: Azzi Abdelmalek 2013년 10월 24일
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
Matt Kindig
Matt Kindig 2013년 10월 22일
편집: Matt Kindig 2013년 10월 22일
What about
B = cell2mat(A{ii})
bugatti79
bugatti79 2013년 10월 22일
Hi Matt,
This is what i had, doesnt work....

댓글을 달려면 로그인하십시오.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 10월 22일
Type
A
whos A
what did you get?
  댓글 수: 13
bugatti79
bugatti79 2013년 10월 24일
C needs to be a matrix not a single numeric value...
Azzi Abdelmalek
Azzi Abdelmalek 2013년 10월 24일
Then just use
D{ii}= i.*n.*B{ii}.*C

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by