I exported my matlab structs to text files so that I can read them in clojure.
I have a text file like:
name
Ali
age
33
friends-ages
30
31
25
47
know I can read this file, but what’s the clojure way to convert it into something like:
(def person1
{:name "Ali"
:age 33
:friends-ages [30 31 25 47]})
or lets make it easier:
name
Ali
age
33
to:
(def person1
{:name "Ali"
:age 33})
I ended up writing an .m file to export my .mat files to text, then imported them by something like the following:
Thanks to the answers by Hamza and Jouni.
The actual code is more like this:
and the converted data file looks like this: