Converting 3 matrix to X Y Z type file

2 vues (au cours des 30 derniers jours)
David McCracken
David McCracken le 11 Août 2019
Commenté : Steven Lord le 11 Août 2019
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

Réponses (1)

Steven Lord
Steven Lord le 11 Août 2019
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 commentaires
David McCracken
David McCracken le 11 Août 2019
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 le 11 Août 2019
In that case, reshape your matrices into vectors first.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by