what is the error here?
조회 수: 1 (최근 30일)
이전 댓글 표시
data1 = [data1,(text(k,6))];
Error using horzcat CAT arguments dimensions are not consistent.
Error in data1 = [data1,(text(k,6))];
댓글 수: 4
답변 (1개)
Walter Roberson
2015년 5월 17일
You need to find an empty position in datatext(Q,:) to assign into. For example,
nextslot = find(cellfun(@isempty,datatext(Q,:)));
if isempty(nextslot)
nextslot = size(datatext,2);
end
datatext{Q,nextslot} = text{k,6};
This will grow datatext wider if necessary in order to handle the new information.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!