Borrar filtros
Borrar filtros

How to reshape coordinate geography

1 visualización (últimos 30 días)
Skydriver
Skydriver el 8 de Abr. de 2019
Editada: madhan ravi el 11 de Abr. de 2019
I want to know on how to reshape geographyc data from 100 x2 mtrix size into 4X25. Is there any one can help me to reshape my data into 4 x 25 matriks data?
Here is my data.
73.5 42.65
73.55 42.65
73.6 42.65
73.65 42.65
73.7 42.65
73.75 42.65
73.8 42.65
73.85 42.65
73.9 42.65
73.95 42.65
74 42.65
74.05 42.65
74.1 42.65
74.15 42.65
74.2 42.65
74.25 42.65
74.3 42.65
74.35 42.65
74.4 42.65
74.45 42.65
74.5 42.65
74.55 42.65
74.6 42.65
74.65 42.65
74.7 42.65
74.75 42.65
74.8 42.65
74.85 42.65
74.9 42.65
74.95 42.65
75 42.65
75.05 42.65
75.1 42.65
75.15 42.65
75.2 42.65
75.25 42.65
75.3 42.65
75.35 42.65
75.4 4 2.65
75.45 42.65
75.5 42.65
75.55 42.65
75.6 42.65
75.65 42.65
75.7 42.65
75.75 42.65
75.8 42.65
75.85 42.65
75.9 42.65
75.95 42.65
76 42.65
76.05 42.65
76.1 42.65
76.15 42.65
76.2 42.65
76.25 42.65
76.3 42.65
76.35 42.65
76.4 42.65
76.45 42.65
76.5 42.65
76.55 42.65
76.6 42.65
76.65 42.65
76.7 42.65
76.75 42.65
76.8 42.65
76.85 42.65
76.9 42.65
76.95 42.65
77 42.65
77.05 42.65
77.1 42.65
77.15 42.65
77.2 42.65
77.25 42.65
77.3 42.65
77.35 42.65
77.4 42.65
77.45 42.65
77.5 42.65
77.55 42.65
77.6 42.65
77.65 42.65
77.7 42.65
77.75 42.65
77.8 42.65
77.85 42.65
77.9 42.65
77.95 42.65
78 42.65
78.05 42.65
78.1 42.65
78.15 42.65
78.2 42.65
78.25 42.65
78.3 42.65
78.35 42.65
78.4 42.65
78.45 42.65
  7 comentarios
Guillaume
Guillaume el 8 de Abr. de 2019
You ask for a 4x25 matrix, yet when you give us the desired shape you show a 2x6 matrix.
So, we still have absolutely no idea what you want. Do you want
1a 5a 1b 5b
2a 6a 2b 6b
3a 7a 3b 7b
4a 8a 4b 8b
or
1a 1b 2a 2b
3a 3b 4a 4b
5a 5b 6a 6b
7a 7b 8a 8b
or something else entirely?
Skydriver
Skydriver el 8 de Abr. de 2019
The second one iw oud be preffer to do it

Iniciar sesión para comentar.

Respuestas (2)

madhan ravi
madhan ravi el 8 de Abr. de 2019
Editada: madhan ravi el 8 de Abr. de 2019
Not sure which orientation you want but adapt which one suits you the best from the below:
reshape(data.',4,[]).' % this suits your comment
reshape(data.',4,[])
reshape(data,[],4).'
reshape(data,4,[])
  5 comentarios
Skydriver
Skydriver el 8 de Abr. de 2019
Editada: madhan ravi el 11 de Abr. de 2019
Thank you Guillaume it done to re arrange lat and lon.
Great
Skydriver
Skydriver el 8 de Abr. de 2019
Dear Guillaume let me ask simple question, how to add/insert a comma in between two pair of lat and lon.
lat1 lon1,lat2 lon2, lat3 lon3,...,lat50lon50

Iniciar sesión para comentar.


Adam Danz
Adam Danz el 8 de Abr. de 2019
Here you go
reshape(data.', 50,4).'
  12 comentarios
Skydriver
Skydriver el 8 de Abr. de 2019
Thank you Adam Danz and Walter's, my code has completly finished its jobs
Adam Danz
Adam Danz el 9 de Abr. de 2019
Editada: Adam Danz el 11 de Abr. de 2019
High five!

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by