Select the content of a cell of an array as variable name in a dataset?
조회 수: 2 (최근 30일)
이전 댓글 표시
I would like to change the dataset variable name with the content of one cell of another array but I got this error:
Error using dataset/subsasgnDot (line 31) NEWNAMES must be a nonempty string or a cell array of nonempty strings.
The comand used is :
test.Properties.VarNames{1} = raw(1:1);
And the content of raw(1:1) is 'type of device', since raw is a read xls appears the name between ''.
Thanks in advance,
댓글 수: 0
채택된 답변
Jan
2013년 7월 10일
Please post the type of raw(1). I guess this will work:
test.Properties.VarNames{1} = raw{1}; % Curly braces
댓글 수: 0
추가 답변 (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!