採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 4 月 14 日

1 投票

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

その他の回答 (1 件)

tdd4c1
tdd4c1 2015 年 4 月 14 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by