大虾帮我看看matlab引擎调用,figure显示了为什么plot没有显示出来?
代码如下:
Engine *ep;
if(!(ep=engOpen("\0")))
{
//MessageBox("Matlab引擎启动失败!","falure");
cout<<"fail"<<endl;
}
engSetVisible(ep,0); //隐藏Matlab窗口
int a=5;
int b=6;
engEvalString(ep,"fh=figure('Position',[300 400 400 300],'Color','w');");
engEvalString(ep,"plot(a,test_add(a,b)");
engClose(ep);
return 0;
我觉得不要figure那句,在matlab里面,plot都会显示出来的,为什么c++调用的时候figure显示了,但是没有plot,就算不要figure那句话,plot也应该显示出来啊!