Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Element-wise-operations/R/element-wise-operations.r
Normal file
12
Task/Element-wise-operations/R/element-wise-operations.r
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# create a 2-times-2 matrix
|
||||
mat <- matrix(1:4, 2, 2)
|
||||
|
||||
# matrix with scalar
|
||||
mat + 2
|
||||
mat * 2
|
||||
mat ^ 2
|
||||
|
||||
# matrix with matrix
|
||||
mat + mat
|
||||
mat * mat
|
||||
mat ^ mat
|
||||
Loading…
Add table
Add a link
Reference in a new issue