How can I multiply a row vector with each of two column vectors?

I have a row vector and two column vectors, and intend to perform their multiplication (element by element). The following is an example.
t = [1 2];
s = [(1:3)',(4:6)'];
The expected result:
1 2 4 8
2 4 5 10
3 6 6 12

 Risposta accettata

Più risposte (0)

Categorie

Scopri di più su MATLAB in Centro assistenza e File Exchange

Prodotti

Release

R2023b

Richiesto:

il 19 Feb 2024

Commentato:

il 19 Feb 2024

Community Treasure Hunt

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

Start Hunting!

Translated by