how can i fix this error?
古いコメントを表示
a=[1 0 1 0 0 0 0 0 0 0 0;
0 1 0 1 0 0 0 0 0 0 0;
0 0 -R*sind(theta) R*cosd(theta) 0 0 0 0 0 0 1;
0 0 0 0 1 0 1 0 0 0 0;
0 0 0 0 0 1 0 1 0 0 0;
0 0 0 0 -R*sind(theta) R*cosd(theta) 0 0 0 0 0;
0 0 -1 0 -1 0 0 0 (4*abs(sign)) 0 0;
0 0 0 -1 0 -1 0 0 (-4*u*sign) 0 0;
0 0 -c (3*R) -c (-3*R) 0 0 (-4*(y-c)) 0 0;
0 0 0 0 0 0 0 0 -sign u*sign 0;
0 0 0 0 0 0 0 0 (-u*sign) 1 0]
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
3 件のコメント
Muhammad Usman Saleem
2016 年 6 月 12 日
please format your code, difficult to read
Emily Gobreski
2016 年 6 月 12 日
Guillaume
2016 年 6 月 12 日
I think what Muhammad meant is your write your long matrix on more than one row as it's difficult to read long lines on the forum.
I've reformated your post so it's easier to see your matrix. Kudos for using the formatting tools.
採用された回答
その他の回答 (1 件)
Muhammad Usman Saleem
2016 年 6 月 12 日
0 投票
One of the rows does not have the same number of columns as the other.
One of the ways this could happen is if one of the elements is empty when the others are not.
1 件のコメント
Guillaume
2016 年 6 月 12 日
Actually, if the problem was with the number of elements per row, the error would have been "Error using vertcat".
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!