Hi,I'm using MatLab 7.1 and I used their example code from mathworks site to try C# and MatLab integration through COM objects.And this error occurs :
Unable to cast COM object of type 'MLApp.MLAppClass' to interface type 'MLApp.DIMLApp'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{669CEC93-6E22-11CF-A4D6-00A024583C19}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Here is the code:
CODE
using System;
using MLApp;
namespace ConsoleApplication4
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
MLApp.MLAppClass matlab = new MLApp.MLAppClass();
System.Array pr = new double[4];
pr.SetValue(11, 0);
pr.SetValue(12, 1);
pr.SetValue(13, 2);
pr.SetValue(14, 3);
System.Array pi = new double[4];
pi.SetValue(1, 0);
pi.SetValue(2, 1);
pi.SetValue(3, 2);
pi.SetValue(4, 3);
matlab.PutFullMatrix("a", "base", pr, pi);// here I get this error
System.Array prresult = new double[4];
System.Array piresult = new double[4];
matlab.GetFullMatrix("a", "base", ref prresult, ref piresult);
}
}
}
Can anyone please help me with this?I don't get it.Why did I get this error? Any kind of help(sooner the better

) is appreciated.