Error-Reference to non-existent field
古いコメントを表示
I get an error when executing the code
clc;
clear;
a2=load('DisA.mat')
b2=load('Distance_text1.mat')
c2=load('Distance_c.mat')
d2=load('Distance_Hist.mat')
for i=1:80
aa=a2.DisA{1,i};%1x96
bb=b2.Distance_text1{1,i};%1x3
cc=c2.Distance_c{1,i};%1x4
dd=d2.Distance_Hist{1,i};%384x1
Features2{i}=[aa,bb,cc,dd'];%1x487
end
save('Features_Distance','Features2')
The error is
Reference to non-existent field 'DisA'.
Error in ==> main at 8
aa=a2.DisA{1,i};%1x96
the size of each one is
{1x80 cell}
6 件のコメント
Chandra Kurniawan
2011 年 12 月 23 日
Are you sure you have variable 'DisA' in your file 'DisA.mat'??
kash
2011 年 12 月 23 日
kash
2011 年 12 月 23 日
Chandra Kurniawan
2011 年 12 月 23 日
No, not the file. But have you 'VARIABLE' DisA in file DisA.mat??
If it's there,
it's better if you rename your variable 'DisA' with other name.
Or rename your mat-file.
It seem both of your variable and your file have a same name.
kash
2011 年 12 月 23 日
Chandra Kurniawan
2011 年 12 月 23 日
I'm sorry.
Now, you don't need to rename your file.
Just do what I suggest for you below :)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!