times | R Documentation |
Emulates the times()
and .*
operators from Matlab.
times(a, b)
a |
first factor of the multiplication |
b |
second factor of the multiplication |
This function basically handles elements of different length
better than the *
operator in R, at least as far as behavior from a
Matlab user is expecting.
matrix with dimensions equal to the larger of the two factors
times(9, 6) x <- matrix(1:4, 2) y <- c(10, 3) print(x) print(y) times(x, y) x * y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.