Garbage values when storing the data into .dat file
4 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Jan
2017-2-27
编辑:Jan
2017-2-27
What you see is the expected output: The 3D array is writting in binary format to the MAT file. It is not random and after a load() you get back the original data.
What exactly is your question? Do you want to create a text file, which can be read by humen? If so, are you really sure, that you need this? A 3D-array need some reshaping to a 2D-matrix for awriting it to a file. Then the values and the structure is not clear anymore in every case. Therefore I'd suggest to stay at the binary format and use Matlab as a viewer of the data, not Notepad.
更多回答(2 个)
Shashi TG
2017-2-27
1 个评论
Walter Roberson
2017-2-27
Sorry, I overlooked that it is 3D. There is no standard text representation for 3D arrays.
It would be possible to write the array to a .m file as code that would recreate the 3D array. For example it could build all the slides and cat(3) them together.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!