MATLAB: How can i multiply each value from a row to each value of another row. matrix Example: A = [1 2 3] B = [ 4 5 6] Answer:[ 4 10 18] Best Answer Read about element-wise operator in MATLAB: https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html A = [1 2 3]B = [4 5 6]Answer = A.*BResult>> AnswerAnswer = 4 10 18 Related SolutionsMATLAB: How to extract rows which contains a specific value in each row. You need to use any:>> a(any(a==1,2),:)ans = 1 2 3 1 2 3>> a(any(a==5,2),:)ans = 4 5 6 4 5 6 MATLAB: Summing a Matrix, row by row. A = [1,2,3;1,2,3;1,2,3]B = cumsum(A) Related QuestionSort rows based on number of 1’s in each row.Multiplying each row vector with each column vector.Remove specific rows by referencing on the first digit of each row.Mean averaging separate rows using a certain section of each row.Mean value of each row
Best Answer