function [dirs]=get_dirs_from_TDSurl(url_base); % GET_DIRS_FROM_URL Get subdirectories from a URL directory % with the datasetScan used to generate the THREDDS catalog, there are % different things to find in s.... s=urlread(url_base); f2=strfind(s,'/'); for i=1:length(f2); tmp=s(f2(i)-35:f2(i)); idx=strfind(tmp,''); % preceeds the file name in all cases dirs{i}=tmp(idx+4:end); end