MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] nlinfit 和 inline 问题求教 (https://www.labfans.com/bbs/showthread.php?t=11551)

Horn 2010-05-17 22:02

nlinfit 和 inline 问题求教
 
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;

以上在MATLAB 6.5 运行正常,
但是我要编译成DLL,编译的时候出现提示The MATLAB Compiler does not currently support MATLAB object-oriented programming. References to the method "inline" will produce a run-time error.
那么各位大侠,没有办法不用这个"inline",来实现上述工能呢?


所有时间均为北京时间。现在的时间是 11:20

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