Converting 3 matrix to X Y Z type file

2 次查看(过去 30 天)
I have 3 matrix (Lat, Long, WS) in the following format
Lat : 50 51 52
Long: 1.0 1.1 1.2
WS: 9.0 9.2 9.8
i would like to combine these matrix such that the outout is as follow
out:
50 1.0 9.0
51 1.1 9.2
52 1.2 9.8
can anybody help how i may go about this please?
Thanks

回答(1 个)

Steven Lord
Steven Lord 2019-8-11
Transpose them and concatenate them as shown in the Concatenating Matrices section on this documentation page. Alternately, if you want to be able to refer to each column by name (Lat, Long, WS) create a table using those vectors.
  2 个评论
David McCracken
David McCracken 2019-8-11
I think i over simplified the example . Each matrix is a 21 x 15 so transposing i dont think would work
so from the three matrix is want all the numebr in cell 1,1 together as above and all the numbers in 2,1 etc
Steven Lord
Steven Lord 2019-8-11
In that case, reshape your matrices into vectors first.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by