# Produce a matrix with 2 vectors

1 visualizzazione (ultimi 30 giorni)
j dr il 4 Apr 2013
Hi, I can't wrap my head around finding the simplest solution for this problem.
I have two vectors
A=[1 2 3] and B=[1;1;2] I want to produce the matrix
C=[1 2 3;1 2 3;2 4 6]
I am certain there is an easy command could I be reminded please !
N.
P.S. there are bonus points if the commands works to produce an N=A*B dimension matrix with 2 matrices of A and B dimensions
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Risposta accettata

j dr il 4 Apr 2013
Just figured out B*A works... Sorry for wasting everyone's time !
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Più risposte (1)

j dr il 4 Apr 2013
But that does not work with matrices...
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by