Converting 3 matrix to X Y Z type file

2 visualizaciones (últimos 30 días)
David McCracken
David McCracken el 11 de Ag. de 2019
Comentada: Steven Lord el 11 de Ag. de 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

Respuestas (1)

Steven Lord
Steven Lord el 11 de Ag. de 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 comentarios
David McCracken
David McCracken el 11 de Ag. de 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 el 11 de Ag. de 2019
In that case, reshape your matrices into vectors first.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by