X Y Z coordinates matrix
12 ビュー (過去 30 日間)
古いコメントを表示
Andrea Hern{andez
2017 年 10 月 17 日
コメント済み: Andrea Hern{andez
2017 年 10 月 17 日
Hi!
I have 3 matrix, one for coordinate x, other for y and other for z. Each one of 2180x10.
I want to have only 1 matrix, where each element of the matriz will be a (x,y,z) point. How can i do that?
0 件のコメント
採用された回答
Sky Sartorius
2017 年 10 月 17 日
You can use the cat command to 'stack' your three 2d matrices into a single 3d matrix:
M = cat(3,x,y,z);
This will give you a 2180x10x3 matrix, and you can access a single (x,y,z) point using M(m,n,:) (or if you prefer the result be a column vector, squeeze(M(m,n,:))).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!