How to store figures generated from matlab in database?

1 visualización (últimos 30 días)
Shreeprasad Bhat
Shreeprasad Bhat el 22 de Jul. de 2017
Comentada: Guillaume el 24 de Jul. de 2017
Is it possible to get raw data of figure to store in database and again generate same exact figure using raw data stored in database? If yes how?
Thank you in advance

Respuesta aceptada

Guillaume
Guillaume el 22 de Jul. de 2017
The simplest would be to save your figure as a .fig file and store the content of that file in your database (as a blob). Retrieve the file from the database and load it back into matlab to recreate the figure.
That's assuming the figure is not a GUI figure.
  2 comentarios
Shreeprasad Bhat
Shreeprasad Bhat el 24 de Jul. de 2017
Thanks for your answer. But the size of figure files are usually large, which results in lot of storage. Is there way to store only raw data of figure?
Guillaume
Guillaume el 24 de Jul. de 2017
It depends what you call raw data and what's in your figure. There is a lot of information to store in order to recreate a figure: all the object displayed (lines, rectangles, points, images, text, etc.) and their properties (location, colour, line style, visibility, thickness, etc.) plus all the information about the axis (tick marks, scaling, visibility), grid, legend, etc.
Unfortunately, matlab does not have methods for serialisation and deserialisation other than saving the objects to fig or mat files.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by