load a file containing disorganized data
显示 更早的评论
Hello,
I load a file containing disorganized data files and I would get the file number located at the end of the file name. Then have the file number in my final matrix. For that I apply this code
if strcmp(Fichiers_Travail2(1,end),1)==1
num_sujet = 1;
elseif strcmp(Fichiers_Travail2(1,end),2)==1
num_sujet = 2;
elseif strcmp(Fichiers_Travail2(1,end),3)==1
num_sujet = 3;
elseif strcmp(Fichiers_Travail2(1,end),4)==1
num_sujet = 4;
elseif strcmp(Fichiers_Travail2(1,end),5)==1
num_sujet = 5;
elseif strcmp(Fichiers_Travail2(1,end),6)==1
num_sujet = 6;
elseif strcmp(Fichiers_Travail2(1,end),7)==1
num_sujet = 7;
elseif strcmp(Fichiers_Travail2(1,end),8)==1
num_sujet = 8;
elseif strcmp(Fichiers_Travail2(1,end),9)==1
num_sujet = 9;
elseif strcmp(Fichiers_Travail2(1,end),10)==1
num_sujet = 10;
end
But I have this error message and I don't understand why because I used the same for another information and it works:
??? Undefined function or variable 'num_sujet'.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!