Search code examples
matrixscilab

Is there any way to multiply 2 matrices element by element scilab


Anyone knows if there is any way to multiple 2 matrices element by element

->(u^i)'
ans  =

1.    1.3    1.69  

-->d^j
ans  =

0.25  
0.5   
1.    
-->u^(i)'*d^(j)
ans  =

2.59 

I don't want to receive a scalar as in this case, but a matrix of element-wise multiplication. I wanna have a element-wise multiplication like 1*0.25, 1.3*0.25, 1.69*1. Any suggestion how can I do this ?


Solution

  • Maybe you're looking for dot product .* (or perhaps more appropriately "dot star")? http://www.math.fsu.edu/~bellenot/class/f07/em2/scilab/scilab-dot