how to multiply each of the array with another set of array
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Grace
am 6 Mai 2014
Beantwortet: Mischa Kim
am 6 Mai 2014
Hi everyone, suppose i have a=1,2,3,4 and j=1,2,3 I want to get 1^1, 1^2, 1^3, 2^1, 2^2, 2^3, 3^1, 3^2, 3^3, 4^1, 4^2 and 4^3. How can i go this?
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 6 Mai 2014
Grace, use
a = [1,2,3,4];
j = [1,2,3]';
b = bsxfun(@power,a,j);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!