y to matrix</code></pre>
</div>
<div id="mixing-matrices-and-vectors" class="section level4 unnumbered">
<h4>Mixing matrices and vectors</h4>
<p>A <span class="math inline">\(1 \times N\)</span> matrix cannot be assigned a row vector or
vice versa.</p>
<pre class="stan"><code>matrix[1, 4] a;
row_vector[4] b;
// ...
a = b;  // illegal assignment of row vector to matrix
b = a;  // illegal assignment of matrix to row vector</code></pre>
<p>Similarly, an <span class="math inline">\(M \times 1\)</span> matrix ma