Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
|
|
|
|
|---|---|---|
|
|
|
In MATLAB (Matrix Laboratory), everything is a matrix. A MATLAB array is a rectangular grid of values — scalars are 1×1 matrices, vectors are 1×N or N×1 matrices, and tables of data are M×N matrices. MATLAB uses square bracket notation [] to define arrays, with spaces or commas separating columns and semicolons separating rows.
Converting Excel data to a MATLAB array produces a ready-to-paste code block you can drop into MATLAB scripts, Live Editor notebooks, Simulink models, or any MATLAB-based workflow — no readtable() or xlsread() calls required.
| Pattern | Example | Result |
|---|---|---|
| Row vector | [1 2 3] | 1×3 matrix |
| Column vector | [1; 2; 3] | 3×1 matrix |
| 2D matrix | [1 2; 3 4] | 2×2 matrix |
| Cell array (mixed types) | {"Alice", 30; "Bob", 25} | 2×2 cell array |
| String array | ["Alice", "Bob"] | 1×2 string array |
Embedded data in scripts — Paste arrays directly into .m files, ensuring the analysis is self-contained and reproducible without external file dependencies.
Signal processing and control systems — Convert test data, sensor readings, or simulation parameters from spreadsheets into MATLAB matrices for fft(), tf(), or lsim().
Machine learning — Generate feature matrices from Excel datasets for use with the Statistics and Machine Learning Toolbox.
Unit testing — Create test input matrices from spreadsheet test cases for MATLAB unit test frameworks.
Avoid readtable dependency — Skip file I/O entirely by embedding data inline. Useful for deployed MATLAB applications and MATLAB Online.
Live Editor notebooks — Embed data arrays directly in Live Scripts for interactive, shareable analyses.
Drag-and-drop upload — Drop any .xlsx, .xls, or .xlsm file onto the upload zone.
Built-in table editor — Modify cell values, add or delete rows and columns, transpose, deduplicate, and apply case transformations before conversion.
Multi-sheet support — Switch between worksheets in multi-sheet workbooks via the sheet selector dropdown.
First Row as Header toggle — Control whether the first row is treated as column headers or regular data.
Find & Replace — Bulk-replace cell values with optional regex and case-sensitive matching.
Undo / Redo — Full edit history so you can revert mistakes.
Copy to clipboard — One-click copy of the generated MATLAB code.
100% client-side — Your spreadsheet data never leaves your device. No files are uploaded to any server.
Upload your file — Drag an .xlsx, .xls, or .xlsm file onto the upload area, or click Click here to choose to browse.
Edit if needed — Use the built-in table editor to modify values, add or remove rows and columns, transpose, deduplicate, or apply case changes.
Click Convert — Press the Convert button in the Properties panel. The MATLAB array output appears in the Output Data area.
Copy the result — Click Copy to Clipboard and paste the MATLAB code into your script or Live Editor.
Input spreadsheet (employees.xlsx):
| Name | Department | Salary |
|---|---|---|
| Alice | Engineering | 95000 |
| Bob | Marketing | 72000 |
| Carol | Engineering | 102000 |
Generated MATLAB cell array output:
data = {
"Name", "Department", "Salary";
"Alice", "Engineering", "95000";
"Bob", "Marketing", "72000";
"Carol", "Engineering", "102000"
};
Numeric matrix (numeric columns only):
data = [
95000;
72000;
102000
];
| Structure | Syntax | Best For |
|---|---|---|
| Numeric matrix | [1 2; 3 4] | Pure numeric data, linear algebra, signal processing |
| Cell array | {"a", 1; "b", 2} | Mixed text and numeric data |
| String array | ["a", "b"] | Text-only data (R2016b+) |
| Struct array | struct("name", "Alice") | Labeled records with field names |
| Table | table(col1, col2) | Column-named datasets (R2013b+) |
This tool generates cell array syntax by default, which handles mixed text and numeric data from Excel. For pure numeric data, use the output as a numeric matrix by removing the quotes.
| Operation | Syntax | Result |
|---|---|---|
| Access element | data(2, 3) | Row 2, Column 3 |
| Extract column | data(:, 3) | All rows, column 3 |
| Extract row | data(2, :) | Row 2, all columns |
| Size | [r, c] = size(data) | Dimensions |
| Transpose | data' | Swap rows and columns |
| Cell access | data{2, 1} | Content of cell (curly braces) |
The tool accepts Microsoft Excel files in .xlsx, .xls, and .xlsm formats. LibreOffice and Google Sheets files exported as .xlsx also work.
No. All processing happens entirely in your browser using client-side JavaScript. Your file never leaves your device. There are no server uploads, transfers, or storage of any kind.
The tool generates cell array syntax using curly braces {}, which handles mixed text and numeric data from Excel. For pure numeric data, remove the quotes to create a standard numeric matrix using square brackets [].
() and {} indexing in MATLAB?Use data(2, 3) to access a cell (returns a cell). Use data{2, 3} to access the content inside a cell (returns the actual value). This distinction only applies to cell arrays. Numeric matrices use () exclusively.
Yes. After uploading, a full table editor appears. You can modify individual cells, add or delete rows and columns, transpose the table, remove duplicates, apply case transformations (UPPERCASE, lowercase, Capitalize), and perform find-and-replace operations.
Yes. When your workbook contains multiple sheets, a dropdown selector appears in the editor header. Choose the sheet you want to convert.
The converter outputs all cell values as strings (quoted). For numeric data, remove the quotes in the output. MATLAB will interpret unquoted numbers as double by default. Use str2double() for string-to-number conversion at runtime.
Since processing is entirely client-side, the limit depends on your browser's memory. Most modern browsers handle workbooks with tens of thousands of rows without issues. For very large datasets, consider using MATLAB's readtable() or readmatrix() functions directly.