Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 14 Apr. 2015

1 Stimme

v1 = [0 1 2 3],
v2 = [0 1 2]
[a,b]=ndgrid(v1,v2)
out=[a(:) b(:)]

Weitere Antworten (1)

tdd4c1
tdd4c1 am 14 Apr. 2015

0 Stimmen

v3 = [repmat(v1',3,1) reshape(repmat(v2,4,1),1,[])']

Community Treasure Hunt

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

Start Hunting!

Translated by