loading .mat files in 2020a

8 ビュー (過去 30 日間)
Josiane Martinez
Josiane Martinez 2020 年 5 月 14 日
コメント済み: Steven Lord 2020 年 5 月 15 日
Unable to load .mat files into MATLAB2020a
  3 件のコメント
Josiane Martinez
Josiane Martinez 2020 年 5 月 14 日
It loads it but the file is unreadable (showing geometric shapes and lines instead of Ascii characters). I attach the file below.
Josiane Martinez
Josiane Martinez 2020 年 5 月 14 日
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 日
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 件のコメント
Josiane Martinez
Josiane Martinez 2020 年 5 月 15 日
編集済み: Josiane Martinez 2020 年 5 月 15 日
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?
Steven Lord
Steven Lord 2020 年 5 月 15 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWorkspace 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