注册 登录
编程论坛 Matlab

vb中调用matlab的com组件

phyllips 发布于 2007-08-18 18:55, 1528 次点击
(1)fun.m如下:
function [f,g]=fun(x)
f=2*x
g(1)=x
只是为了测试用的
(2)
com组件中包含了 constr,lp ,fun
(3)在vb中调用如下:
Call t.constr(4, x, Options, lambda, hess, "fun", x_in, "", vlb, vub, gradfun, 6)
其中,x,Options,lambda,hess 申明为variant类型 ,为输出
x_in =10.0 vlb=20.0 vub=40.0
为题:
调用的时候,提示 “fun” was called with more than the declared number of input(fun函数输入参数过多的意思)
不知道有没有人可以帮忙看下,提个建议什么的
1 回复
#2
ouyang_m2008-11-05 09:55
kan kan
你应该把你的constr函数的代码拿出来看看的!
1