<div dir="ltr">Well, I guess this is not the most efficient way to do this, is it? I mean, there are a lot of copies and temporary files ...<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-28 0:42 GMT-03:00 Samuel Gougeon <span dir="ltr"><<a href="mailto:sgougeon@free.fr" target="_blank">sgougeon@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="m_2154114782015898937moz-cite-prefix">Le 28/05/2017 à 03:55, Adelson Oliveira
      a écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Thanks,<br>
          <br>
        </div>
        <div>The trick is to create an auxiliar matrix "A" where replics
          of array "a" fill the columns and to perform regular elemental
          multiplications with a reshaped version of the target
          hypermatrix "H" and then reshape the result as original H. It
          maybe fast because of vectorization but I still have two
          questions. This demands addtional memory space if one cannot
          to do everything in one step,<br>
          <pre style="font-style:normal"><span style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)">and, would it be possible to multiply a line vector "b=(1:5)" to all lines of "H" or another array 
</span></span></pre>
          <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)"><span style="font-family:arial,helvetica,sans-serif">"c" to the third dimension of H in a vectorized way</span><tt>?
</tt></span></pre>
        </div>
      </div>
    </blockquote>
    <br>
    <tt>Yes: you must first use permute() to put in first position the
      dimension along which you want to multiply the vector, then
      process as before, and finally re-permute() the result in the
      reverse way.<br>
      <br>
      <br>
    </tt>
  </div>

<br>______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/<wbr>mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>