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,

采纳的回答

Jan
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 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by