Can .mat files be moved between platforms? (IE say from a mac running OS X 10.6.5 with MatLab 2014a to RedHat Unix running 2016a or to Windows 10 running 2016b?)

7 次查看(过去 30 天)
How portable are .mat files when using MatLab? I found a couple of good information sources in support, but none answered my question.

采纳的回答

John D'Errico
John D'Errico 2017-3-3
Yes. They are completely portable, as long as...
1. You have the same set of toolboxes on each platform.
2. You are careful about system calls, and how you treat files, OUTSIDE of MATLAB. After all, paths and path separators are different on different platforms. So you need to use the appropriate tools for that, like pathsep, filesep, etc.
3. You do not use compiled code, which can be platform dependent.
Otherwise, m-files are simple text files. Multiple platforms are no problem. I've used the same set of tools on the Mac, Windoze, Unix, going back and forth with no problems.
  3 个评论
Nathan
Nathan 2017-3-4
Gentlemen, Thank you for your comments. I apologize that my question may have made it appear that I was new to porting code between platforms. I've actually been doing that for quite sometime, including compiling code on each platform using the mex command and all the challenges that involves with complier differences, MatLab version differences etc... I was just weighing the pros and cons of using the convince of saving and loading a .mat vs a .txt with csv and couldn't find any documentation in support on portability as I'm writing code on my Mac laptop and then porting to a supercomputer running red hat to make large runs and then copying the results back for analysis on my local machine.
Walter Roberson
Walter Roberson 2017-3-4
Just worked out this evening that the representation of digitalfilter objects changed as of R2015b so those would not be portable between the versions you mentioned

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by