How can I have System.Console.WriteLine write to the MATLAB command window while using the .NET API in MATLAB 7.8 (R2009a)?
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Get Started with Microsoft .NET in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!