How to combine 3 [nx3] matrices
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I've got 3 matrices [nx3], made up from xyz files, and I need to combine them into:
x=[a(:,1),b(:,1),c(:,1)];
y=[a(:,2),b(:,2),c(:,2)];
z=[a(:,3),b(:,3),c(:,3)];
before I can plot all these into 1.
I would like to thank Mohammad for advising me with the above code to kick start with combining my 3 bathymetry files. However, MATLAB keeps giving me an error message:
Error using horzcat CAT arguments dimensions are not consistent.
Thanks
Eve
0 件のコメント
回答 (1 件)
Image Analyst
2014 年 10 月 21 日
Eve:
They have different numbers of rows. Put these lines before the error:
whos a
whos b
whos c
Tell me what it says in the command window.
4 件のコメント
Mohammad Abouali
2014 年 10 月 22 日
Well, I am not working for MATHWORKS in any capacity. But one of the things that I really like about MATLAB is their documentation. It is really nicely written. Try to get some of the PDF and just read them through them.
And this Support section is also very nice. It is indeed very well supported software.
参考
カテゴリ
Help Center および 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!