times {matlab2r} | R Documentation |
Element-wise matrix multiplication
Description
Emulates the times()
and .*
operators from Matlab.
Usage
times(a, b)
Arguments
a |
first factor of the multiplication |
b |
second factor of the multiplication |
Details
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.
Value
matrix with dimensions equal to the larger of the two factors
Examples
times(9, 6)
x <- matrix(1:4, 2)
y <- c(10, 3)
print(x)
print(y)
times(x, y)
x * y
[Package matlab2r version 1.5.0 Index]