- 积分
- 13
- 注册时间
- 2007-10-27
- 仿真币
-
- 最后登录
- 1970-1-1
|
本帖最后由 feynmand 于 2010-11-29 15:18 编辑
混合编程以前用的很少,今天尝试使用c#调用matlab的时候出了一个小问题,matlab函数文件编译的时候总是失败,提示如下信息:
- Unable to determine function name or input/output argument count for function
- Compiler version: 4.14 (R2010b)
- in M-file "D:\program\November29 c#\testtest.m".
- Processing include files...
- Please use MLINT to determine if this file contains errors.
复制代码 这个测试里面只有一个函数文件testtest.m,内容如下:
- function [na,cur,fan_w]=testtest(na)
- % author:Richard Dong
- % update:2010-11-26
- n=length(na);
- n1=n;
- na=fix(rand(1,n1)/0.09)/10; % 取值范围(0,1)
- cur=fix(rand(1,n1)/0.09)/10; % 取值范围(0,1)
- fan_w=fix(rand(1,n1)/0.25); % 取值范围[0 1 2 3]
- end
复制代码 matlab版本是2010b,vs 2008,操作系统xp |
|