Is it possible to execute the MatLab "Disp" function from DLL?
Ältere Kommentare anzeigen
A library file & .dll has been created using MatLab so that I could use it in my 64-bit C application. The MatLab script that I would like to call from the C application creates a diary, and uses the "disp" function to generate the text file.
When I execute the MatLab script from my C application, the following errors are generated: "Error writing to output stream" and "Error using ==> disp". If I change my MatLab script so that the text file is generated using fprintf, I do not see the error.
Is there a way that I can resolve the issue without using the "fprintf" approach?
2 Kommentare
Walter Roberson
am 30 Nov. 2012
Are you using MATLAB Compiler, or MATLAB Coder?
Vincent
am 3 Dez. 2012
Antworten (1)
Image Analyst
am 30 Nov. 2012
0 Stimmen
You can just put the name of the variable all by itself on the line of code and I would think that it would display it just like it does when you do the same thing in the command window. By the way, what's wrong with fprintf()? And it's not clear to me whether you want to print to the console window (like disp should do), or to a text file (like you mentioned). Where do you want to print your stuff, the console window, a text file, or both?
1 Kommentar
Vincent
am 3 Dez. 2012
Kategorien
Mehr zu C Shared Library Integration finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!