DMFitter Samples

HTML scripts

The HTML pages listed below include script code that operates with DMFitter ActiveX control. You must open these files in the Microsoft Internet Explorer browser (or by Data Master 2003).

TestLinearFit.htm - Basic IDMFitter.LinearFit() test with simple polynomial expression.

TestLinearEFit.htm - Tests IDMFitter.LinearFit(). User-defined basis functions are calculated in the event handler.

TestLinearGFit.htm - Tests IDMFitter.LinearFit() with user-defined (string expression) basis.

TestLMFit.htm - Polynomial model is used to test IDMFitter.LMFit().

TestFitObject.htm - This page used to test IDMFitter.LMFit(). Unlike TestLMFit.htm, it uses VBS class for analytically defined function and partial derivatives instead of string expression parsing.

TestLMFitEvents.htm - Another LM fitting example: function and derivative calculated using events.

TestAniLMFit.htm - Animated LM fitter (notice: parameters are changed after each LM iteration). Warning: you must run this file in DM2003 browser window.

TestLMFitJS.htm - In this example DMFitter invoked from JavaScript language.

TestLMFitEJS.htm - Advanced use of IDMFitter.LMFit() in JavaScript code (both function and derivative are calculated in the event handlers).

TestLMFitter.htm - Several tests of new LMFitter coclass (almost all features used, VBScript language).

Test2DLMFit.htm - This script tests how IDMFitter.LMFit() works with multi-dimensional independent variable.

Test2DLMFit2.htm - A version of the previous application that uses new LMFitter coclass.

NistLMFitter.htm - Test with standard data series created by the NIST StRD group. This is a version of nist_nlsf.htm applet from DM2003 samples and it uses nist_nlsf.dmw desktop.

Other examples

DMFitter control can be used with any ActiveX host platform, including (but not limited to): MSHTML (Internet Explorer), MS Office (VBA), VB.Net, Data Master 2003, Borland Delphi, Windows Scripting Host (WSH), etc.

TestDMLinearFit.vbs - This script invokes LinearFit member of DMApplication object or DMFitter object. Both methods return the same and must be invoked from the DM2003 Script Editor.

weight.vbs - Use this file with weight.dat to test weight feature of LM fitter. It will automatically search and load data file, fit and display result. This script must be executed under Windows Scripting Host.

TestFitter.xls - Demonstrates how to use DMFitter class in the Microsoft Office Excel macros. Warning: non-standard decimal point character may result in errors in Excel examples (this problem is in Excel).

TestAniLMFit.xls - Another Excel example: animated chart with data points and "live" LM fit curve.

TestLinearFit.dpr - This Delphi application is a very close translation of VBScript code from TestLinearFit.htm sample.

TestLMFit.dpr - Delphi translation of TestLMFit.htm sample.

TestLMFitEvents.dpr - This translation of TestLMFitEvents.htm sample demonstrates how to implement special helper class in order to connect to COM events. Standard TLB import and TOLEControl wrapper cannot be used because DMFitter implements very limited subset of OLE interfaces.

DMFitterTestVB.zip - Simple Visual Studio 2005 project (VB.Net).

DMFitterTestCS.zip - Simple Visual Studio 2005 project (C#).

Data Files

g_linear.dat (g_linear.txt) - Use this dataset to test General Linear fitter tool (provided with Data Master 2003).

polynom.dat (polynom.txt) - Polynomial dataset similar to one created by HTML tests.

weight.dat (weight.txt) - This file used by weight.vbs script.

2dx.dat (2dx.txt) - Test data for Multi-X NLSF Tool.