Hello Im trying to check if a string exist within a strucure:
The string is the structure path, which I created using sprintf I can not detect if the string coincide with the path of an existent structure in the workspace (Clicks).
Eval dosent work for structures neither fieldnames … there is any way to check if exist or not in the workspace???
thanks in advance
prof_l=unique(prof_list);shore_l=unique(shore_list);% read clicks and extract shoreline
met=('fix'); %
for i1=1:numel(prof_l) p=prof_l(i1,1);for i2=1:1:numel(shore_l) s=shore_l(i2,1); file=(sprintf('Clicks.prof_%u.shore_%u.%s',p,s,met)); if exist(eval(file),var) ==1; disp('hola')endendend
Best Answer