Embed a Matlab graph in a C++ GUI application
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm using matlab compiler to generator c++ shared librari from m files. Now I've result graph in separated window. I'm iterest Is it possible to embed a Matlab graph in a C++ GUI application?
댓글 수: 0
답변 (1개)
Martijn
2011년 2월 9일
You cannot embed an "interactive graph" into your C++ GUI, static graphs should work though. So you are then just displaying the graph as an image and you lose zoom, pan, etc. abilities.
Possible ways to accomplish this are:
1. Use the figToImStream function to get your figure in a bitmap binary array. On the C++ side display this bitmap in a Picture Box.
2. Use PRINT function to place the graph on your clipboard. On the C++ side get the image from the clipboard and again display it as a picture.
3. Use PRINT function to write the graph to an image file. On the C++ side load the image from disk and display as picture.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!