MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   C/C++ (https://www.labfans.com/bbs/forumdisplay.php?f=70)
-   -   [问题] matlab com bulider 生成DLL的问题 (https://www.labfans.com/bbs/showthread.php?t=11547)

Horn 2010-05-17 14:45

matlab com bulider 生成DLL的问题
 
function PL=MBFPL(x,y,beta0)
%save Input.txt x y beta0 -MAT
plot(x,y,'ro'); hold on;
ylabel('ABS%')
xlabel('Depth')
title('ELISA Four-parameter Logistic(4PL)');
fun = inline('beta0(1)+(beta0(2)-beta0(1))./[1+exp(beta0(3)*(x-beta0(4)))]', 'beta0', 'x');
PL=nlinfit(x,y,fun ,beta0);
%save OutPut.txt PL -ascii
text(0.9,0.95,'拟合函数 y=P1+(P2-P1)./[1+exp(P3*(x-P4))');
text(0.9,0.8,['P1=',NUM2STR(PL(1))]);
text(0.9,0.7,['P2=',NUM2STR(PL(2))]);
text(0.9,0.6,['P3=',NUM2STR(PL(3))]);
text(0.9,0.5,['P4=',NUM2STR(PL(4))]);
x= x(1):.01: x(6);
y=PL(1)+(PL(2)-PL(1))./[1+exp(PL(3)*(x-PL(4)))];
plot(x,y,'b');hold on;
hold off;
以上是编译DLL的源M文件,在Matlab 运行正常,显示如下图,
[IMG]http://b41.photo.store.qq.com/http_imgload.cgi?/rurl4_b=ca41a6ca2fca9b16572bcce87d54c0ba85b30476c0b603263879392857ead236e469e5cca214bd171d4bd26687d29b80b7981b5b472fe8c2571b9fa0dba0ab9e33fdd99699d9fabcb39a8fceccaaef3e8e58f2b9&a=31&b=41[/IMG],
VC调用执行的结果如下图
[IMG]http://b41.photo.store.qq.com/http_imgload.cgi?/rurl4_b=ca41a6ca2fca9b16572bcce87d54c0ba10f9b51307aeadc7dcb78f532496403c694a7561230f38c27e22921ad744def5597da6f8d2fce170c62652cdcc6ea7b3a5896c70580dc1dfdab9bec0b308200d4c393f2b&a=41&b=41[/IMG],
感觉是“title('ELISA Four-parameter Logistic(4PL)');”下面的语句没有执行,不知道为什么,请各位达人指点迷津


所有时间均为北京时间。现在的时间是 21:23

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.