RosettaCodeData/Task/Element-wise-operations/MATLAB/element-wise-operations.m

5 lines
75 B
Matlab

a = rand;
b = rand(10,10);
scalar_matrix = a * b;
component_wise = b .* b;