loading .mat files in 2020a

Unable to load .mat files into MATLAB2020a

3 个评论

How are you trying to load the MAT-files into release R2020a (what command or series of steps are you using) and what specifically happens when you try? Does MATLAB:
  • Throw an error? If so can you show us the full and exact text of the error message (all the text displayed in red) displayed in the Command Window.
  • Issue a warning? If so can you show us the full and exact text of the warning message (all the text displayed in orange) displayed in the Command Window.
  • Crash? If so please send the crash log file along with the MAT-file to Technical Support for investigation. You can use the telephone icon in the upper-right corner of this page to contact Support.
  • Load the data incorrectly? If so we'll probably need to see a sample MAT-file along with an explanation of why you believe the data was loaded incorrectly. It could be it's just getting displayed in a different way than you expected.
  • Do something else unexpected? If so please provide more details about what exactly happens and what you expected to happen.
It loads it but the file is unreadable (showing geometric shapes and lines instead of Ascii characters). I attach the file below.
I have tried a number of different approaches. I first open the file directly from Windows Explorer. Then I opened Matlab and selected Find File and deselected SKIP FILES for the .mat type.

请先登录,再进行评论。

回答(1 个)

Steven Lord
Steven Lord 2020-5-14

0 个投票

Are you trying to open the file in the MATLAB Editor?
This is a data file, not a program file. You read the data stored in a MAT-file by calling load, not by trying to edit it or dragging and dropping it into the MATLAB Editor.

2 个评论

Thank you very much for this helpful guidance. I looked up the load command and was able to see the data. I do not think this is a convenient or proper way for a student to convey results to another person since it requires I enter commands in MatLab to view the file. Most students create pdfs showing their code and results. What are .mat files typically used for? Is it used to store data in variables from previous calculations so that a user can access them again in the future and perform new operations with them possibly?
Yes, MAT-files are intended to store data so you and others can refer to that data in the future. If you want to present your results to another human being there are other tools and file formats.
Live scripts and functions allow you to write code and text and include pictures, results, etc. in the file. Other MATLAB users can read and run your live script or live function.
If you want to share your live script or live function with others in a static form, you can export it to various formats including PDF, LaTeX, and Microsoft Word. Or if you're not working with a live script you could publish it to various formats.
If you're taking a course where you have lab work, MAT-files are like the notebooks where you record the raw data you collect as you run your experiments. Live scripts and published scripts are like the reports of your results where you analyze your results and show them to your professor to be graded. If your professor reads your report (live script) and wants to see the raw data you could send them the MAT-file.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by