The ability to evaluate commands in a MATLAB Engine session and have the graphics directly displayed in your own application is not available in MATLAB.
However, you can save the image as pixels by using the following command:
mydata=frame2im(getframe())
Note: This command can be executed from within your C program with the use of
the ENGEVALSTRING command.
You can then send "mydata" to your engine application via the ENGGETVARIABLE function.
For more information on the FRAME2IM function, type the following at the MATLAB Command Prompt:
For more information on ENGGETVARIABLE, type the following:
Best Answer