How to export from Mathematica so that Matlab can see a variable name other than Expression1
4 次查看(过去 30 天)
显示 更早的评论
I'm exporting a variable from Mathematica to disk in .mat format.
Later I want to read this in Matlab.
When I load the .mat file, my variable is called Expression1
How do I export it properly in Mathematica so that my original variable name is preserved?
(I don't know if this is possible. I can't find out how to do it when I search the mathematica help files)
Thanks,
Tom
2 个评论
dpb
2024-8-2
I've not used Mathematica in 20+ yr, but reading the doc for Export, I don't see any option to set a variable name in the .MAT file by the syntax shown, either.
You can name the file and then use the function style of load to return in a struct that you can then rename the field(s) of programmatically may be about the best workaround I see.
You may be better off asking in a Mathematica newsgroup rather than here for arcane things that might be doable.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!