matrix2WordEq
Versión 1.0.0 (4,58 KB) por
Eduard Clotet
Macro for copying large matrices into a Microsoft Word equation matrix
Copy the content of a Matlab matrix to a Word Equation matrix using the Windows clipboard.
Copy matrix into Word Equation:
1) Create a Word Equation box in the document
2) Run the matrix2WordEq function
3) Place the cursor over the Word equation box
4) Wait for the values to be copied
* Note 1: In the case of copying values into a Word Equation larger than 225 cells, the matrix structure must be manually created before calling this function (it is a Microsoft Word limitation).
* Note 2: If values are not being copied properly, increase the CopyPause time.
Ex: matrix2WordEq(M, 'CopyPause', 0.7);
* Note 3: See the documentation to get the full list of parameters (help matrix2WordEq).
Examples:
- Example 1: Copy a 4x6 matrix to a Word Equation:
1) Create an equation box in the Word document.
MS Word menu bar -> insert -> equation
2) Execute in a Matlab terminal:
matrix2WordEq(rand(4,6));
3) Navigate to the Word document and select the equation box
4) After 5 seconds (by default) the matrix will be created and the values will get copied.
- Example 2: Fill an already existing Word Equation matrix:
1) Create an equation box in the Word document.
MS Word menu bar -> insert -> equation
2) Add a 3 by 3 matrix.
With the equation box selected, navigate to "Equation tools" and add a 3x3 matrix.
3) Execute in a Matlab terminal:
matrix2WordEq(rand(3,3), 'CreateMatrix', 0);
4) Navigate to the Word document and select the top-left cell of the matrix.
5) After 5 seconds (by default) the values will start to get copied to the matrix.
- Example 3: Copy a 4x6 matrix to a Word Equation with values containing four decimal places:
1) Create an equation box in the Word document.
MS Word menu bar -> insert -> equation
2) Execute in a Matlab terminal:
matrix2WordEq(rand(4,6),'Format','%.4f');
3) Navigate to the Word document and select the equation box
4) After 5 seconds (by default) the matrix will be created and the values will get copied.
Citar como
Eduard Clotet (2026). matrix2WordEq (https://es.mathworks.com/matlabcentral/fileexchange/136095-matrix2wordeq), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2016b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
| Versión | Publicado | Notas de la versión | |
|---|---|---|---|
| 1.0.0 |
