file extraction...error.
1 次查看(过去 30 天)
显示 更早的评论
hi i am running this code and getting this error for some reason.can anybody help why???
d = dir('*.xls'); N_File = numel(d); % no of files present in the folder for same class
for num = 1:N_File
k = fullfile(d(num).name);
[~,~,dat] = xlsread(d(num).name);
C = [C;num2cell(num*ones(size(dat,1),1)),dat];
end
??? [~,~,dat] = xlsread(d(num).name); | Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
1 个评论
Walter Roberson
2011-12-15
http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
采纳的回答
Walter Roberson
2011-12-15
Your version of MATLAB is probably too old to support using ~ in assignments.
Change
[~,~,dat] = xlsread(d(num).name);
to
[unneeded1,unneeded2,dat] = xlsread(d(num).name);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!