Description Usage Arguments Details Value See Also Examples
Convert R objects of class matrix into character strings that represent the matrix in a Matlab style
1 |
A |
a numeric matrix of any dimension |
noquote |
(optional) if |
Matlab reads matrices using a unique one-line notation that can prove useful
for storage in databases and importing multiple matrices into a program at
once, amongst other applications. This notation is by row, with "[" and "]"
to specify the beginning and end of the matrix respectively, ";" to specify a
new row and a space between each matrix element. Thus, the R matrix created
using matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3)
is
equivalent to [0 1 2;0.5 0.1 0;0 0.6 0.6].
R2Matlab
takes an R object of class matrix converts it into a
Matlab-style character string that may be useful for exporting into databases.
Object of class character representing A
in a Matlab style.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.