I´m working on a project, where a C# process interacts with Matlab via COM. I start the Matlab command window like this:
Type matlabApp = Type.GetTypeFromProgID("Matlab.Application");
matlab = Activator.CreateInstance(matlabApp);
It´s working fine so far.
But when I run my application twice, I still only get one Matlab command window where both C# processes share a common workspace which yields in different problems in my application (e.g. race conditions as each process can also change the other´s Matlab variables).
How can i force each process to open its own Matlab command window with its own workspace?