Mac操作系统,求大佬帮忙看一看什么问题,MATLAB报错:
Error using matlab.graphics.internal.name (line 101)
Cannot create output file 'D:/Matvideo/robert/1.jpg'.
Error in print (line 71)
pj = matlab.graphics.internal.name( pj );
Error in saveas (line 181)
print( h, name, ['-d' dev{i}] )
Error in zed (line 18)
saveas(mh,lujing);
代码如下:
close all;
clc;
for i=1:6929
path='D:\Matvideo\lunkuo\';
disp(i);
path=strcat(path,num2str(i));
p=strcat(path,'.jpg');
f=imread(p);
f=rgb2gray(f);
roberts=edge(f,'roberts');
[m,n]=find(roberts==1);
%scatter(n,-m,'.'); % 1
mh=scatter(n,-m,'.'); % 2
axis([0 1950 -1100 0]);
lujing=strcat('D:\Matvideo\robert\',num2str(i));
lujing=strcat(lujing,'.jpg');
saveas(mh,lujing); % 5
pause(0.05);
end
clear;
clc;
WriterObj=VideoWriter('fireworks1.mp4', 'MPEG-4');
open(WriterObj);
for i=1:6929
pic='D:\Matvideo\robert\';
pic=strcat(pic,num2str(i));
ppic=strcat(pic,'.jpg');
frame=imread(ppic);
disp(ppic);
writeVideo(WriterObj,frame);
end
close(WriterObj);
已经以管理员身份运行matlab了,依旧修复不了