getting "Cell contents reference from a non-cell array object" error
11 次查看(过去 30 天)
显示 更早的评论
%%trying to read multiple text files, and store data, and plot
clc;clear all;
clc
%tic
FileList=dir('D:\Matlab2010\Filesfolder\Code for files\Textfilesreference/');
j=1;
for i=3:1:(size(FileList))
FileName{j}=FileList(i).name;
j=j+1;
%disp(FileName);
end
% for i=1:size(FileName,2)
% FileDate{j} = FileName{j}(00:50);
% end
for j=1:size(FileName,2)
fin=fopen(['D:\Matlab2010\Filesfolder\Code for files\Textfilesreference/',FileName{j}],'r');
s=1;
while ~feof(fin)
tt=fgetl(fin); %Scan all lines
%fclose(fin);
%disp(FileName);
if s>=25 && s<=41
aa=(tt);
Desc{s-24,:}=strsplit(aa(1:47));
Dataopen{s-24,:}=strsplit(aa(50:65));
Dataend{s-24,:}=strsplit(aa(72:size(aa,2)));
% Data{s-24,:}=aa(50:size(aa,2));
% Data_Split{s-24,:}=strsplit(Data{s-24,:});
end
s=s+1;
end
for k=1:size(Dataopen,1)
Data_All{j}{i,1}=strcat(Desc{i}{1,:});
Data_All{j}{i,2}=Data_Split{i}{1,1};
Data_All{j}{i,3}=Data_Split{i},{1,2};
end
end
After I run this code i am "Cell contents reference from a non-cell array object" error Pl help
1 个评论
Image Analyst
2014-10-31
You forgot to paste in the error message - you just snipped out a small part of it and left out the most crucial part - the line of code that cause the error! Please paste in all the red text. I can't even run this code because you didn't attach any data files, so I can't even replicate your error because it doesn't get that far.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!