Write figure/plot to jpeg with Coder support

h=figure;
...
print(h,'-djpeg',path);
The script generates a rotated view of a 3D object (surface plot) from data out of a `csv` file (i got around Coder not supporting csvread()).
`print` is ofc not supported by Coder either, so what would be the best course of action, since i need that script translated to C++?
I cannot use Compiler/shared lib approach, because the target doesn't allow for MCR installation.
something akin to
fwrite(fopen('debug.jpg','w'),h);
obviously doesn't work

답변 (1개)

Puru Kathuria
Puru Kathuria 2021년 1월 4일

0 개 추천

Hi,
fwrite and fopen seem to be C/C++ code generation compatible as mentioned in the documentation. You can try if these functions complete your requirements.

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 2월 19일

답변:

2021년 1월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by