Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Creating new user-defined model in Model-Based Calibration toolbox
Date: Tue, 2 Dec 2008 13:38:01 +0000 (UTC)
Organization: The MathWorks Ltd
Lines: 18
Message-ID: <gh3dnp$1h2$1@fred.mathworks.com>
References: <ggum8u$kt1$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228225081 1570 172.30.248.38 (2 Dec 2008 13:38:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 2 Dec 2008 13:38:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1297382
Xref: news.mathworks.com comp.soft-sys.matlab:504359


Hi Mohammed,

The function weibul.m is setup for the weibul model and contains functionality specific to that model. If you delete the code in the subfunction i_rfvals and replace it with 

function [rf,dG]= i_rfvals(U,b) %#ok<INUSL,DEFNU>

rf = [];
dG = [];

it should work. There are other functions in weibul that will be invalid for your model. If you are not certain what to do I suggest you replace all the optional functions with the ones in xregusermod/functemplate.

I recommend that you start from the blank template file xregusermod/functemplate when writing a user-defined model. weibul is documented as an example of user-defined models rather than a template.

I'd be happy to help you further if you send me your user-defined model and let me know what version of MBC you are using.

Best regards,
Ian