Error using vertcat CAT arguments dimensions are not consistent.

1 回表示 (過去 30 日間)
Raman
Raman 2014 年 12 月 19 日
コメント済み: Raman 2014 年 12 月 19 日
>> y=[71. 8829,23.6291,87.1431,16.3153,34.6145,25.6653,44.7321,19.1620,69.4536,73.6550,21.3468;
11.5840,10.3016,1.3980,6.2992,5.3152,12.4589,11.5234,10.6321,10.3478,13.4277,11.2086;
11.5810,10.3016,1.3980,6.2992,5.3152,12.4589,11.5234,10.6321,10.3478,13.4277,11.2086;
7.8103,8.5148,0.7738,6.354,5.7532,10.8831,2.0036,7.4165,9.5611,7.3412,10.2158];
Error using vertcat
CAT arguments dimensions are not consistent.
I got this error. kindly tell me to how to correct it.

採用された回答

Geoff Hayes
Geoff Hayes 2014 年 12 月 19 日
Raman - the error message is telling you that the vertical concatenation of the rows in y is failing because not all rows have the same number of columns. Rows 2 through 4 have 11 elements, whereas the first row appears to have 12 because of the space between 71. and 8829. Just remove this space as
y=[71.8829,23.6291,87.1431,16.3153,34.6145,25.6653,44.7321,19.1620,69.4536,73.6550,21.3468;
11.5840,10.3016,1.3980,6.2992,5.3152,12.4589,11.5234,10.6321,10.3478,13.4277,11.2086;
11.5810,10.3016,1.3980,6.2992,5.3152,12.4589,11.5234,10.6321,10.3478,13.4277,11.2086;
7.8103,8.5148,0.7738,6.354,5.7532,10.8831,2.0036,7.4165,9.5611,7.3412,10.2158];
and you will be able to create the matrix y.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by