フィルターのクリア

What's wrong with -> ??? Error using ==> vertcat

2 ビュー (過去 30 日間)
tedy
tedy 2013 年 4 月 12 日
Hello,
i wanna ask, what's wrong with my code bellow?
data=[
1 1:1 2:2 3:2 4:2 5:2 6:2 7:2 8:2 9:2 10:2 11:2 12:2 13:2 14:2 15:2 16:3;
1 1:1 2:2 3:2 4:2 5:2 6:2 7:2 8:2 9:2 10:2 11:2 12:2 13:2 14:2 15:3 16:3;
2 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:1 11:1 12:1 13:1 14:3 15:3 16:3;
3 1:1 2:1 3:1 4:1 5:1 6:1 7:1 8:1 9:1 10:2 11:2 12:1 13:1 14:3 15:3 16:1];
it's so simple, but it result ??? Error using ==> vertcat CAT arguments dimensions are not consistent. is there something wrong? please help me. Thanks in advance
  1 件のコメント
Iman Ansari
Iman Ansari 2013 年 4 月 12 日
編集済み: Iman Ansari 2013 年 4 月 12 日
the result is:
1 1 2
1 1 2
2 1
3 1
each row has different number of columns. What is 3:2 mean?

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

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 4 月 12 日
first line: 1 is [1], 1:1 is [1], 2:2 is [2], 3:2 on to 16:3 are all [] (empty), so the first line is [1 1 2]
third line: 2 is [2], 1:1 is [1], 2:1 is empty, 3:1 through 16:3 are all [], so the third line is [2 1]. That is a different length than the first line.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by