在Delphi中调用matlab的例子
varV : Variant;
MReal : OleVariant;
MImage : OleVariant;
begin
i,j : integer;
MReal := VarArrayCreate(, varDouble);
MImage := VarArrayCreate(, varDouble);
V := CreateOLEObject('Matlab.Application');
V.Execute('a=');
V.GetFullMatrix('a','base',VarArrayRef(MReal),VararrayRef(MImage));
for i := 0 to 1 do
for j := 0 to 3 do
Stringgrid1.Cells := MReal;
V.Execute('peaks');
MReal := VarArrayCreate(, varDouble);
MImage := VarArrayCreate(, varDouble);
for i := 0 to 1 do
for j := 0 to 3 do
MReal := i+4;
V.PutFullmatrix('b','base',VarArrayRef(MReal),VararrayRef(MImage));
end
有价值,不错
有价值,不错 楼主,搞个delphi调用matlab动态链接库的详细例子看一下啊~
页:
[1]