Merge 2 fields in a structure

조회 수: 10(최근 30일)
Tyler Murray
Tyler Murray 2016년 9월 6일
댓글: Walter Roberson 2016년 9월 7일
After I use importdata MATLAB splits up my data for some reason. The result is 2 fields within one structure, is a 6000x9 double and A.textdata is a 6000x16 cell. The goal is to have one matrix 6000 x 25. Since they have the same number of rows I figured I could combine them using
A1 = [, A.textdata];
however I get the error "Error using cat Dimension must be a real positive finite integer." I am unsure if it is because some of the cells contain strings.
A1 = {{:}; A.textdata{:}};
did not work either.


Walter Roberson
Walter Roberson 2016년 9월 7일
[num2cell(, A.textdata]
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 9월 7일

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

Community Treasure Hunt

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

Start Hunting!

Translated by