How to open .mat in matlab
MAT is a data file of matlab. You can directly double-click to import
or enter the command through the command window and write an m file to import
If it is a file in the current directory file1.mat, directly enter load
file1
If it is not in the current directory, enter
load(['Directory\file1.mat']);
If file1 contains the three variables a, b, and c,
After importing, the three quantities a, b, and c will directly exist in the data space
If you are afraid that there are duplicate names in the data space, the existing data will be flushed
You can also name the data when loading
For example
data1
=
load('file1.mat');
The data names in file1 will become the data1 struct
Each field of the data
will be assigned a value of
data1.a
data1.b
data1.c
Of course, you can only see one struct in the data space
cell, called data1