How can I have System.Console.WriteLine write to the MATLAB command window while using the .NET API in MATLAB 7.8 (R2009a)?
古いコメントを表示
I have a C# .NET assembly (MATLABWriter.dll) project with the following code:
namespace MATLABWriter {
public class WriterClass {
public void Write() {
System.Console.Write("Hello, world!");
}
}
}
I have loaded the .NET DLL in MATLAB using the NET.addAssembly command:
>> NET.addAssembly("MATLABWriter.dll");
>> writerObj = MATLABWriter. WriterClass;
The Write() method has a call to System.Console.Write to write the specific text out to the command window.
However, if I execute the Write() method, MATLAB does not print the text:
>> writerObj.Write
Is there a way to write this text to the MATLAB command window?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with Microsoft .NET についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!