Storing a matlab struct in SQL database

5 visualizaciones (últimos 30 días)
Senthil Selvaraj
Senthil Selvaraj el 11 de Mayo de 2021
Comentada: Rik el 14 de En. de 2023
I have a struct variable (with nested structs) in matlab. I would like to store this variable in database and retreive it without any loss or change in format.
Is it better to use as varbinary(MAX) in SQL Server for storing the variable?
What is best method to use to convert struct to binary in SQL and read it back from database?
  2 comentarios
Hans Nerlich
Hans Nerlich el 13 de En. de 2023
same question here
Rik
Rik el 14 de En. de 2023
You could write your own style of JSON (the built-in is not guaranteed to return the same data, especially for arrays and empty objects).
You could also store your variable in a mat file, read as hex text and store that in your database. A bit of an odd solution, but it should work.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by