问题描述
我在MATLAB中训练了模型,并将模型参数保存在.mat文件中.我想阅读C ++中的所有参数.
我已经上传了类似的模型 我可以使用matOpen打开model.mat文件并访问字段名称.但是我无法访问结构数组的内容. 有人可以帮我吗? 谢谢. 您可以研究一下matio: www.github.com/tbeu/matio 它支持所有MATLAB文件版本,包括(嵌套的)结构和单元格. I trained my model in MATLAB and the model parameters are saved in .mat file. I want to read all the parameters in C++. I have uploaded a similar model here. I can open the model.mat file using matOpen and access the field names. But I'm not able to access the contents of array of structures. Can someone help me with that. Thank you. You could take a look into matio: www.github.com/tbeu/matio It supports all MATLAB file versions, including (nested) structs and cells. 这篇关于在C ++中读取.mat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!