因为是要生成dll文件在C#中调用,所以希望直接保存生成的图片不显示,如果显示的话,在c#窗体程序中调用时会另外弹出一张图片,所以希望不显示,好像网上有一个解决方法
function Paint
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
x=[0.4,0.55];
y=[0.4312,0.6534];
plot(x,y);
set(gcf,'visible','off');
saveas(gcf,'text','bmp')
delete(gcf);
end
但是尝试后报错
>> paint
Warning: Failed in CreateCompatibleBitmap, last error code 00000057
> In E:\Program Files\win7\MATLAB\R2010b\toolbox\matlab\graphics\hardcopy.p>hardcopy at 21
In graphics\private\render at 142
In print at 316
In saveas at 156
In paint at 9
??? Error using ==> print at 364
Out of memory. Type HELP MEMORY for your options.
Error in ==> saveas at 156
print( h, name, ['-d' dev{i}] )
Error in ==> paint at 9
saveas(gcf,'text','bmp')求高手解惑
你好,像你说的这样改后图片还是会闪出来一下,有没有能让图片一直都不出现,直接保存的方法
追答sorry,那就不知道咋弄了。
本回答被提问者采纳