Pass variables from double to cell

조회 수: 1 (최근 30일)
Maria 2014년 6월 24일
댓글: Maria 2014년 6월 24일
I had a double variable A and I changed it to a cell-type variable B in the following way:
B = num2cell(A);
Then I built a new cell with different columns (all the other columns are from the cell-type):
ABC=[ B C D E F G];
and it gave me an error:
|Error using horzcat
Dimensions of matrices being concatenated are not consistent|
It is strange because I am working with cells all with the same number of rows. Can anyone help me? Thanks in advance for the help.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 6월 24일
What you can do is
unless your variables have the same number of rows
  댓글 수: 1
Maria 2014년 6월 24일
I managed to solve the problem! I guess I was dealing with several types of cells coming from different variables. I did it similar to what you suggested. Thanks a lot!

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

추가 답변 (0개)


Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by