create a variable to store sets

5 ビュー (過去 30 日間)
jana
jana 2013 年 6 月 7 日
I would like to create a variable that stores a set of numbers for an arc (a,b).
S(a,b) = {1,2,3,4,5}
S(b,c) = {3,4,5} etc
but I dont know how to write it in matlab. Please help

採用された回答

Iain
Iain 2013 年 6 月 7 日
Sounds like you need a cell array:
S{set_no} = [2 3 5 6];
S(2} = [1 5 6 3 64 23];
  1 件のコメント
jana
jana 2013 年 6 月 7 日
thankyou!

サインインしてコメントする。

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 6 月 7 日
S{1,1}='a',
S{1,2}='b'
S{1,3}={1,2,3,4,5}
S{2,1}='b',
S{2,2}='c'
S{2,3}={3,4,5}

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by