loading .mat files in 2020a

7 visualizaciones (últimos 30 días)
Josiane Martinez
Josiane Martinez el 14 de Mayo de 2020
Comentada: Steven Lord el 15 de Mayo de 2020
Unable to load .mat files into MATLAB2020a
  3 comentarios
Josiane Martinez
Josiane Martinez el 14 de Mayo de 2020
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 el 14 de Mayo de 2020
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.

Iniciar sesión para comentar.

Respuestas (1)

Steven Lord
Steven Lord el 14 de Mayo de 2020
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 comentarios
Josiane Martinez
Josiane Martinez el 15 de Mayo de 2020
Editada: Josiane Martinez el 15 de Mayo de 2020
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 el 15 de Mayo de 2020
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Workspace Variables and MAT Files en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by