title: Unable to multiply matrix in opencv java
body: <p>I am new to Opencv in java. Problem is whenever i try to multiply two Mat type object of dimension (m x n) and (n x l) it gives the error. </p>
  
  <blockquote>
    <p>OpenCV Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array') in cv::arithm_op, file ........\opencv\modules\core\src\arithm.cpp, line 1287
    Exception in thread "main" CvException [org.opencv.core.CvException: cv::Exception: ........\opencv\modules\core\src\arithm.cpp:1287: error: (-209) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function cv::arithm_op
    ]</p>
  </blockquote>
  
  <p>Here are my two matrices. </p>
  
  <pre><code>    Mat r = new Mat(2, 2, CvType.CV_32F);
      r.put(0, 0, 0.707);
      r.put(0, 1, -0.707);
      r.put(1, 0, 0.707);
      r.put(1, 1, 0.707);
  
      Mat mult = new Mat(1, 2, CvType.CV_32F);
      double d1 = 1.00;
      double d2 = 2.00;
      mult.put(0, 0, d1);
      mult.put(0, 1, d2);
      Mat final_mat = mult.mul(r);
  </code></pre>