Converting 3 matrix to X Y Z type file

2 ビュー (過去 30 日間)
David McCracken
David McCracken 2019 年 8 月 11 日
コメント済み: Steven Lord 2019 年 8 月 11 日
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 Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by