Storing a matlab struct in SQL database

조회 수: 5 (최근 30일)
Senthil Selvaraj
Senthil Selvaraj 2021년 5월 11일
댓글: Rik 2023년 1월 14일
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
Hans Nerlich
Hans Nerlich 2023년 1월 13일
same question here
Rik
Rik 2023년 1월 14일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by