Info

此问题已关闭。 请重新打开它进行编辑或回答。

Showing Matlab output command on Visual Studio using Matlab Engine

1 次查看(过去 30 天)
I use Matlab engine to run below matlab script on Visual Studio.
% test.m
for i=1:30
fprintf('i = %d\n', i);
end
How can I show the output continuously on Visual Studio?
//engdemo.cpp
#define BUFSIZE 256
int main()
{
// ...
Engine *ep;
char buffer[BUFSIZE+1];
buffer[BUFSIZE] = '\0';
engOutputBuffer(ep, buffer, BUFSIZE);
engEvalString(ep, "test");
while (1) {
printf("%s", buffer); // ???
}
// ...
}

回答(0 个)

此问题已关闭。

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by