我这里有个数学模型,每一块的实现都写成.m文件了,怎么将它们全部导入MATLAB然后只运行主程序就可以?谢谢
主程序如下
% estimate_pareto_nbd.m
%
% Script to estimate the Pareto/NBD parameters
% *** requires the Optimization Toolbox ***
% *** assumes the script load_data.m has be run ***
%
% Peter S. Fader (
http://petefader.com)
% Bruce G.S. Hardie (
http://brucehardie.com)
% Ka Lok Lee (
http://kaloklee.com)
%
% Last modified 2005-03-16
lb = .0001 * ones(1,4);
ub = 20 * ones(1,4);
initial = ones(1,4);
[params ll] = fmincon('pareto_nbd_ll',initial,[],[],[],[],lb,ub)
compute_pactive(params)