Showing Matlab output command on Visual Studio using Matlab Engine

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 件)

この質問は閉じられています。

製品

タグ

質問済み:

Hg
2016 年 6 月 2 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by