Error using imwrite>parse_inputs (line 515) The first argument should not be a string

10 次查看(过去 30 天)
when i use directory name im getting this error.
dr=uigetdir();
A=dir([dr,'\*.jpg']);
for i=1:size(A)
B=strcat(dr,'\',A(i).name);
cd('C:\Users\user17\Documents\MATLAB\C\');
imwrite(B,'newimage.jpg');

回答(1 个)

Geoff Hayes
Geoff Hayes 2019-1-21
Rajani - try using copyfile to copy the file from one location to another.

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by