Write figure/plot to jpeg with Coder support

2 visualizaciones (últimos 30 días)
kamikatze13
kamikatze13 el 19 de Feb. de 2020
Respondida: Puru Kathuria el 4 de En. de 2021
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

Respuestas (1)

Puru Kathuria
Puru Kathuria el 4 de En. de 2021
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.

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by