MATLAB MAT File Viewer

Open a .mat file to list its variables with class and size, browse matrices and struct fields page by page, plot numeric columns and download a slice or a whole variable.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Open

    Load a .mat file.

  2. 2
    Variables

    Check names, classes and sizes.

  3. 3
    Browse

    Pick an array or struct field.

  4. 4
    Slice

    Move rows, columns or the page.

  5. 5
    Export

    Save CSV, XLSX or JSON.

Informazioni su questo strumento

The MATLAB MAT File Viewer reads MAT-files in your browser, which helps when a supervisor, an instrument or a published dataset gives you a .mat file and you do not have MATLAB, or you just want to see what is inside before writing code. It reads the old level 4 format, level 5 files saved by MATLAB with the -v6 option, the default v7 files whose variables are zlib-compressed, and v7.3 files, which are HDF5 containers. Level 4 and level 5 files are decoded by the tool's own reader. Numeric arrays of every class are supported, from double and single to int8 through uint64, along with logical arrays, char arrays, cell arrays, structs, objects and sparse matrices, and complex numbers keep their imaginary part. The summary shows the file name and size, the format, the number of variables and the byte order. The Variables tab lists each variable's name, class, size in MATLAB order and a short description such as 50×4 double or 1×15 char with the text itself. The Datasets tab flattens everything into arrays, so struct fields appear as paths like settings.gain, and the Attributes tab shows each item's MATLAB class and size along with the file header text. A Structure tab draws the same content as a tree you can open and close. The Browse arrays tab is the main working view. You pick one array from a list, and for arrays with three or more dimensions you choose the index of each leading dimension, so a 100×80×12 array is viewed one 100×80 page at a time. Rows are shown 200 at a time and columns 40 at a time, a line chart plots the first five columns of the current window, and the window can be downloaded as CSV, XLSX or JSON. A separate button saves the whole array as CSV when it has no more than 5 million values, and a top-level button saves every variable as JSON.

Who this is for

Engineering and neuroscience students given lab recordings as .mat files, Python and R users who want to check variable names before loading them with scipy or R.matlab, and reviewers looking through supplementary data from a paper.

How to use it

1. Open a .mat file, or press Load a sample. 2. Read the Variables tab for names, classes and sizes. 3. Go to Browse arrays and pick a variable or struct field. 4. Move the first row, first column or page index to see other parts. 5. Download the slice, the whole array as CSV or all variables as JSON.

What the sample shows

The sample, experiment.mat, is a level 5 file with 4 variables. time is a 1×50 double running from 0 to 4.9 in steps of 0.1. signal is a 50×4 double whose columns hold a sine, a cosine, a damped sine and a marker that is 1 on every seventh row. subject is the 1×15 char 'Trial 12, lab B', and settings is a 1×1 struct with 3 fields: rate_hz equal to 10, gain equal to [1.5 2 2.5] and operator equal to 'A. Rahman'. In Browse arrays, row 1 of signal reads 0.0998, 0.995, 0.0966 and 0, and the chart draws all four columns against the row index.

Structs and cells

Each struct field becomes its own entry in the dataset list, named with a dot path, so nested values can be paged and plotted like any other matrix. Cell arrays are opened element by element in the tree. The JSON download keeps the nesting, writing structs as objects and cells as lists, with numbers that cannot be written in JSON, such as Inf and NaN, saved as text.

Files saved with -v7.3

A v7.3 file is read with h5wasm, the HDF5 library compiled to WebAssembly, which is fetched from a public CDN the first time it is needed, so the first such file needs an internet connection. The file itself stays on your device. MATLAB stores these arrays transposed, so the Variables tab reverses the sizes into MATLAB order, while Browse arrays and the Datasets table show the sizes as stored in HDF5, and cell contents sit in a #refs# group.

Limits

Function handles and opaque objects, which include table, string, datetime and categorical values, are listed but not decoded. In the Variables tab the value column stays empty for v7.3 files. The whole-array CSV is limited to 5 million values, so download larger arrays as slices. Treat the output as a data view, not engineering or scientific advice, and confirm key numbers in MATLAB when they matter.

Esempio svolto

experiment.mat: 4 variables; signal is 50×4 double and row 1 reads 0.0998, 0.995, 0.0966 and 0.

In breve

Domande frequenti

Can I open a .mat file without MATLAB?

Yes. Level 4, level 5 and v7 files are decoded in the browser, and v7.3 files are read with an HDF5 library that runs in the page.

Does it support MAT v7.3?

Yes. Those files are HDF5, read with h5wasm loaded from a CDN on first use. Sizes in the array browser follow the stored HDF5 order, which is the reverse of MATLAB order.

How do I look at a 3-D array?

In Browse arrays, set the index of the first dimension to choose a page, then move the first row and first column to scroll through that page.

Why is my table or string variable not shown?

MATLAB saves table, string, datetime and similar objects in a private format. The tool lists them but cannot decode their contents.

Can I export a matrix to CSV?

Yes. Download the current window as CSV, XLSX or JSON, or press Whole dataset CSV for arrays of up to 5 million values.

Is my data uploaded anywhere?

No. The file is read in your browser. Only the HDF5 library for v7.3 files is downloaded from a CDN, and no data goes with it.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue