I'd like to load a MATLAB file that stores a 1x1 struct with 4 fields using Go. I haven't found anything comparable to Python's SciPy which has a "loadmat" function. What is the best way to read .mat files in Go?
Asked
Active
Viewed 1,029 times
2 Answers
5
You may have to write your own Go package. MathWorks suggests that you interface with their MATLAB MAT-file C API. To do that in Go, use cgo.
References:

peterSO
- 158,998
- 31
- 281
- 276
1
No, there doesn't seem to be any project for reading MalLab files in pure Go (in CGo, see PeterSO's answer):
- go-search doesn't list any relevant project
- GitHub doesn't have any either.
- the Libraries list doesn't include any
And, there were performance consideration as well, mentioned in "Go matrix library".
The discussion was more about calling go from Matlab.