<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MATLAB element-wise product in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793183#M2416</link>
    <description>At the outset you should recognize that Matlab is an interpreted language with an emphasis on matrix manipulation, whereas Fortran (in which Lapack was written) and C++ are compiled languages. Compiled languages have far fewer verbs (or primitives, if you prefer) than interpreted languages. Any urge to wish that one were more like the other is, therefore, misguided unless one already has much experience with the former.&lt;BR /&gt;&lt;BR /&gt;Fortran is endowed with few standard procedures for mathematical tasks, but has the features needed to build such procedures into, e.g., a library such as MKL. You will have to look in the MKL documentation MKL and find routines which when assembled together will fulfil your needs.&lt;BR /&gt;&lt;BR /&gt;Matlab is proprietary, whereas C and Fortran are covered by international standards.</description>
    <pubDate>Mon, 28 Feb 2011 14:12:22 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2011-02-28T14:12:22Z</dc:date>
    <item>
      <title>MATLAB element-wise product</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793182#M2415</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;first, i am a newbie here, therefore sorry for any inconvenient or inappropriate content of this message.&lt;BR /&gt;&lt;BR /&gt;i am trying to convert some matlab+simulink program to c++ and searching for the functions coming with MATLAB in MKL.&lt;BR /&gt;&lt;BR /&gt;my project uses matrices and i couldnt find how to convert the following expression from matlab:&lt;BR /&gt;&lt;BR /&gt;"A=rand(10);&lt;BR /&gt;B=rand(10);&lt;BR /&gt;C= A.*B;"&lt;BR /&gt;&lt;BR /&gt;is this a special matlab function or is there an implementation for this in mkl?&lt;BR /&gt;&lt;BR /&gt;i have the same problem also with the function/block in simulink; "weighted moving average"&lt;BR /&gt;&lt;BR /&gt;i searched the documents and the forum, but couldnt find information.&lt;BR /&gt;&lt;BR /&gt;would be pleased to solve &lt;BR /&gt;&lt;BR /&gt;thanks in advance</description>
      <pubDate>Mon, 28 Feb 2011 12:55:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793182#M2415</guid>
      <dc:creator>bcor</dc:creator>
      <dc:date>2011-02-28T12:55:30Z</dc:date>
    </item>
    <item>
      <title>MATLAB element-wise product</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793183#M2416</link>
      <description>At the outset you should recognize that Matlab is an interpreted language with an emphasis on matrix manipulation, whereas Fortran (in which Lapack was written) and C++ are compiled languages. Compiled languages have far fewer verbs (or primitives, if you prefer) than interpreted languages. Any urge to wish that one were more like the other is, therefore, misguided unless one already has much experience with the former.&lt;BR /&gt;&lt;BR /&gt;Fortran is endowed with few standard procedures for mathematical tasks, but has the features needed to build such procedures into, e.g., a library such as MKL. You will have to look in the MKL documentation MKL and find routines which when assembled together will fulfil your needs.&lt;BR /&gt;&lt;BR /&gt;Matlab is proprietary, whereas C and Fortran are covered by international standards.</description>
      <pubDate>Mon, 28 Feb 2011 14:12:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793183#M2416</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2011-02-28T14:12:22Z</dc:date>
    </item>
    <item>
      <title>MATLAB element-wise product</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793184#M2417</link>
      <description>As mecej4 implies, Fortran has built-in array operations which may resemble matlab, but C++ itself does not. There are C++ class implementations which address this, but you have the (big) initial step of deciding whether you like one or more of those:&lt;BR /&gt;blitz++ (open source)&lt;BR /&gt;ArBB (proprietary)&lt;BR /&gt;C interface to MKL Fortran style functions (both open source and proprietary optimized versions)&lt;BR /&gt;.....</description>
      <pubDate>Mon, 28 Feb 2011 14:36:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793184#M2417</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-02-28T14:36:45Z</dc:date>
    </item>
    <item>
      <title>MATLAB element-wise product</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793185#M2418</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;apart from options mentioned so far, you can also try to use Python (&lt;A href="http://mathesaurus.sourceforge.net/matlab-numpy.html"&gt;numpy&lt;/A&gt; lib) and its implementation which uses MKL for high efficiency (not quite sure why you convert the code, speed? avoiding Matlab?). Everything depends on your experience and how big the code is.&lt;BR /&gt;And for the record:&lt;BR /&gt;&lt;BR /&gt;A=rand(10);&lt;BR /&gt;B=rand(10);&lt;BR /&gt;&lt;BR /&gt;&lt;TT&gt;rand(n)&lt;/TT&gt; returns an &lt;TT&gt;n&lt;/TT&gt;-by-&lt;TT&gt;n&lt;/TT&gt; matrix
containing pseudorandom values drawn from the standard uniform distribution
on the open interval (0,1) (this from Matlab docs) -&amp;gt; so you can easily find counterpart in MKL.&lt;BR /&gt;&lt;BR /&gt;C= A.*B is element wise (is the element-by-element)
product of the arrays &lt;TT&gt;A&lt;/TT&gt; and &lt;TT&gt;B&lt;/TT&gt;. &lt;BR /&gt;&lt;BR /&gt;As far as "weighted moving average" routine goes. The easiest way is just to open matlab *.m or Octave file containing the code and see how they implement it (at the end of the day is just multiplication and summation).&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Mar 2011 03:45:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793185#M2418</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2011-03-01T03:45:43Z</dc:date>
    </item>
    <item>
      <title>MATLAB element-wise product</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793186#M2419</link>
      <description>okay, thanks for replies&lt;BR /&gt;&lt;BR /&gt;i created a project using matlab+simulink, and now the second part of it is to write it on C++ using ms visual studio 2008. Therefore, although there is nothing to do with speed or convenience, i just have to convert it.&lt;BR /&gt;&lt;BR /&gt;Beside, doing this i want to use already validaded and verified libraries. Thats why i hesitate implementing the functions on my own.&lt;BR /&gt;&lt;BR /&gt;There are some other libraries (blitz, lapack++ etc..) which can use MKL behind, and have the the same syntax with matlab. At first i didnt want to use many different libraries, make it complex and had questions about the performance. But now i think i should use them.&lt;BR /&gt;&lt;BR /&gt;i have also heard about armadillo and boost. Maybe i should test them all initially then choose the best performance+convenient syntax.</description>
      <pubDate>Tue, 01 Mar 2011 08:40:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MATLAB-element-wise-product/m-p/793186#M2419</guid>
      <dc:creator>bcor</dc:creator>
      <dc:date>2011-03-01T08:40:29Z</dc:date>
    </item>
  </channel>
</rss>

