Create a larger matrix in special case <p>I have two vectors:</p> <pre><code>A=[1 2 3 4] B=[3 5 3 5] </code></pre> <p>I want to find a matrix from these vectors like this:</p> <p>you can suppose that <code>c</code> is a <code>plot matrix</code>, where the x-axis is <code>A</code> and <code>y-axis</code> is <code>B</code>:</p> <pre><code>c = 0 4 0 4 3 0 3 0 0 0 0 0 0 0 0 0 </code></pre> <p>or:</p> <pre><code> c1= 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 </code></pre> <p>My question is how to create it automatically because I have large vectors.</p>