procedure TForm1.Button1Click(Sender:Tobject); var matlab:variant; begin try matlab:=GetActiveOleObject('Matlab.Application'); except matlab:=CreateOleObject('Matlab.Application'); matlab:=CreateOleObject('Matlab.Application.5'); matlab.execute('a=[1 1/ 3 1/5] '); matlab.execute('b=[3 1 1/3]'); matlab.execute('plot(a,b)'); end
|