Im currently doing a reconition program that use Matlab to construct the main code and us
VB as interface. for my program now, it can open the Matlab but after that it shown error and close the Matlab. below is the code in
VB
'Set mfile directory name
initDirectory = App.Path & "\mFile\"
'Set mfile filename "start up file" here
startMfile = "Init.m"
'temporary storage before passing image to matlab
tempImage = directoryname & namaFail
Call bufferImage
DoEvents
'string to pass to Matlab to run mFile from mfile directory
MatLabCommand = "run('" & initDirectory & startMfile & "')"
Set Matlab = CreateObject("Matlab.Application")
'execute matlab command
With Matlab
Visible = False
Result = .Execute(MatLabCommand)
End With
Call PlateNum
Hope that anyone can help me ont his matter. Thank you
best regards
fennsc