注册 登录
编程论坛 VC++/MFC

求助 MATCOM 问题,望不吝赐教,谢谢!

hk_zgy 发布于 2014-09-13 16:28, 448 次点击
写了一个简单的测试程序:
m文件为:
function [z]=fun(x1)
 y=sin(x1);
 z=y;
 end
 MFC程序按钮的测试代码为:
initM(MATCOM_VERSION);
 Mm x,y,z;
 x.r(1,1)=3;x.r(2,1)=-1;x.r(3,1)=5;
 //    fun(x,i_o,P1);
 P1=fun(x);
 int row =z.rows();
 int col =z.cols();
 int row =P1.rows();
 int col =P1.cols();
 for(int i=1;i<row+1;i++)
 {
    for (int j=1;j<col+1;j++)
    {
           CString str3;
           str3.Format("%f",P1.r(i,j));
    }
 }
 exitM();
 1、当 P1=fun(x)时,程序编译正确,为fun(x,i_o,P1)时,编译:error C2660: 'fun' : function does not take 3 parameters,请问是怎么回事?
2、在VC中点击MATCOM工具“眼镜”Visual Matrix Viewing 输入reload变量时,说“could not connect to VC”,在另一台电脑上说“Error:cannot locate debugged process, add the global :unsigned int milbpr...”,是不是MATCOM没有安装好,还是什么原因?就是设置断点后不能查看变量。
 十分感谢!
1 回复
#2
yuccn2014-09-15 12:56
function does not take 3 parameters  不是说的很明白了吗?
1