From: Neil on
Hi

I am using a MATLAB automation server via C# and would like to save the output to the command window using the diary function.

i.e.

MLApp.MLAppClass ml = new MLApp.MLAppClass();
ml.Execute("diary('myDiary.txt')");
ml.Execute("version");
ml.Quite();

The diary file is created, however it is empty. I assume this is because the command is not echoed to the command window. I have tried explicity setting echo on with
ml.Execute("echo on");
but still have the same issue.

On a separate note, when do the following:
string result = ml.Execute("a = 1");
then value of string is 'nkn'
Any idea why?

P.S. I am doing this as part of an ASP.NET application.

Thanks
Neil
From: Neil on
"Neil " <neil.iain(a)gmail.com> wrote in message <hvn1gj$qu3$1(a)fred.mathworks.com>...
> Hi
>
> I am using a MATLAB automation server via C# and would like to save the output to the command window using the diary function.
>
> i.e.
>
> MLApp.MLAppClass ml = new MLApp.MLAppClass();
> ml.Execute("diary('myDiary.txt')");
> ml.Execute("version");
> ml.Quite();
>
> The diary file is created, however it is empty. I assume this is because the command is not echoed to the command window. I have tried explicity setting echo on with
> ml.Execute("echo on");
> but still have the same issue.
>
> On a separate note, when do the following:
> string result = ml.Execute("a = 1");
> then value of string is 'nkn'
> Any idea why?
>
> P.S. I am doing this as part of an ASP.NET application.
>
> Thanks
> Neil

Ok I was being a complete idiot with the ml.Execute code. So please disregard that.
However, I am still running int the diary issue.