How to call Matlab (ActiveX) in Delphi?

zhaozj2021-02-12  128

7). How to call Matlab (ActiveX) in Delphi?: # Fangq (qianqian.fang@dartmouth.edu), 2002/6 / 22.Biggreen / Mathtools #

Downloadings from this address: http://www.djpate.freeServe.co.uk/matlab.htm

There is also a way to use Delphimex, download address: http://radio-bip.qc.ca/delphimex/delphimex.html

Here is some of the main statements in the example of Alex Conradie:

VAR

V: Variant; MREAL: Olevariant; MIMAGE: Olevariant

Begin I, J: Integer;

MREAL: = VararrayCreate ([0, 1, 0, 3], VARDOUBLE); MIMAGE: = VararrayCreate ([0, 0, 0, 0], VARDOUBLE);

V: = createoleObject ('matlab.application'); v.execute ('a = [1 2 3 4; 5 6 7 8]'); v.GetFullMatrix ('A', 'Base', Varayref (MREAL), Vararrayref (MIMAGE)); for i: = 0 to 1 do for j: = 0 to 3 do stringgrid1.cells [j, i]: = manal [i, j];

V.execute ('peaks');

MREAL: = VararrayCreate ([0, 1, 0, 3], VARDOUBLE); MIMAGE: = VararrayCreate ([0, 0, 0, 0], VARDOUBLE);

For i: = 0 to 1 do for j: = 0 to 3 do manal [i, j]: = i 4;

V.PutfullMatrix ('b', 'base', varrayref (means), Vararrayref (MIMAGE));

end

Sender: hyphone (more you love you), the letter area: Mathtools Title: Re: How to call Matlab ActiveX Service Send Station in Delphi: BBS Shuimu Tsinghua Station (Sat Jun 1 13:34:48 2002)

// C Builder is this: Variant matlab; ... matlab = creteoleObject ("matlab.application"); matlab.exec ("Help")); matLab = unassigned; // Delphi should be like this MATLAB: VARIANT; .... MATLAB: = CreateoleObject ('matlab.application'); matlab.execute ('help'); matlab: = unassigned;

[In the masterpiece of Chengpp (LY):]: I want to call the application in Delphi,: call MATLAB's ActiveX service,: That is called MATLAB's drawing function: What should I do? : Ask a master "" "" "" "" "" "" "" ""

Calling Matlab in Delphi

Var v: Variant; MREAL: Olevariant; MIMAGE: Olevariant; Begin I, J: Integer; MREAL: = VararrayCreate ([0, 1, 0, 3], VARDOUBLE); MIMAGE: = VaRrayCreate ([0,0,0, 0], VARDOUBLE); V: = CreateoleObject ('matlab.application'); v.execute ('a = [1 2 3 4; 5 6 7 8]'); v.GetFullMatrix ('a', 'base' Vararrayref (MREAL), Vararrayref (MIMAGE)); for i: = 0 to 1 do for j: = 0 to 3 do stringgrid1.cells [j, i]: = manal [i, j]; v.execute (' Peaks'); MREAL: = VararrayCreate ([0, 1, 0, 3], VARDOUBLE); MIMAGE: = VaRrayCreate ([0,0,0,0], vardouble); for i: = 0 to 1 do for J : = 0 TO 3 Do MREAL [I, J]: = i 4; V.PutfullMatrix ('B', 'Base', Varayref (MREAL), VARARRAYREF (MIMAGE); END

Comments: This is not the best way I think, the best is com

转载请注明原文地址:https://www.9cbs.com/read-7208.html

New Post(0)