Как ускорить вычисления
03.06.2020
Коллеги, доброе утро
Как ускорить код?
for i=1:length(data1.gTruth.DataSource.Source)
for j=length(data1.gTruth.DataSource.Source{i}):-1:1
if contains(data1.gTru...
Коллеги, доброе утро
Как ускорить код?
for i=1:length(data1.gTruth.DataSource.Source)
for j=length(data1.gTruth.DataSource.Source{i}):-1:1
if contains(data1.gTruth.DataSource.Source{i}(j:end),'\')
data1.gTruth.DataSource.Source{i}(j:end);
folderName{i}=data1.gTruth.DataSource.Source{i}(1:j);
break
end
end
end
uniqName=unique(folderName)';
for i=1:length(uniqName)
alternativePaths={[ uniqName{i} dirWayOut ]};
unresolvedPaths = changeFilePaths(data1.gTruth,alternativePaths);
end
Задача изменить путь к картинкам, но такой алгоритм считает долго 44000 сек. Как можно получить путь к файлу из следующей сроки
C:\Users\USER\Documents\Matlab\new_captcha_with_mounting_dots\New folder (2)\737515.526.png
Комментарии
пока сделал так:
данные позволяют.
второй вопрос был: как из C:\Users\USER\Documents\Matlab\new_captcha_with_mounting_dots\New folder (2)\737515.526.png поулчить C:\Users\USER\Documents\Matlab\new_captcha_with_mounting_dots\New folder (2)\? Есть ли какая-нибудь встроенная функция?