Jump to content

Element-wise operations: Difference between revisions

+Stata
(Added Kotlin)
(+Stata)
Line 1,955:
matrix_multiplication(&matrix1, &matrix3).unwrap().print();
}</lang>
 
=={{header|Stata}}==
 
<lang stata>mata
a = rnormal(5,5,0,1)
b = 2
a:+b
a:-b
a:*b
a:/b
a:^b
 
a = rnormal(5,5,0,1)
b = rnormal(5,1,0,1)
a:+b
a:-b
a:*b
a:/b
a:^b
end</lang>
 
=={{header|Tcl}}==
Line 1,997 ⟶ 2,017:
alias ./ elementwiseMatSca {{a b} {expr {$a/$b}}}
alias .** elementwiseMatSca {{a b} {expr {$a**$b}}}</lang>
 
 
=={{header|zkl}}==
1,336

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.