getting "Cell contents reference from a non-cell array object" error

조회 수: 10 (최근 30일)
Mekala balaji
Mekala balaji 2014년 10월 31일
댓글: Image Analyst 2014년 10월 31일
%%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
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 CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by