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 Center および File ExchangeGraphics Object Properties についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by