Mo0nKizz
Mo0nKizz

Reputation: 322

Read and write XML in MATLAB

I would like to do exactly what readstruct and writestruct do in MATLAB 2020b :

S = readstruct(filename)
writestruct(S,filename)

But for MATLAB 2019, these methods don't exist. How can I accomplish the same behaviour in R2019?

Upvotes: 0

Views: 473

Answers (1)

user16372530
user16372530

Reputation: 754

I'm not sure, if they do exactly the same as readstruct and writestruct, but there are two similar functions available in MathWorks' File Exchange:

struct2xml: https://de.mathworks.com/matlabcentral/fileexchange/28639-struct2xml

xml2struct: https://de.mathworks.com/matlabcentral/fileexchange/28518-xml2struct

Upvotes: 2

Related Questions