<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 28/05/2017 à 03:55, Adelson Oliveira
a écrit :<br>
</div>
<blockquote
cite="mid:CAOsmt4UAHnSw+qGTcSm3w22xCamwTg6kTDBjEdS+x_gKyeV8_A@mail.gmail.com"
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>
</body>
</html>