Borrar filtros
Borrar filtros

Extracting data from a text file into an array

1 visualización (últimos 30 días)
Ram R
Ram R el 9 de Ag. de 2016
Respondida: Stalin Samuel el 9 de Ag. de 2016
I have a file filled with day by day temperature maxima's for 40 years. Each day shows the max temperature for 500 or so grid points. I am attempting to firstly call this file in Matlab then select the largest value for each grid point from each month. If anyone could give me some pointers or sources to use to solve this it would be much appreciated. I have tried using multiple different websites and other peoples forums to help me but have made no progress. (I'm new). Thanks for any help it is much appreciated.
Sample of data is shown bellow: 2011 9 11 298.400 298.700 299.100 299.500 299.700 299.700 299.600 299.500 299.200 299.300 299.800 299.700 299.300 299.000 299.100 299.700 300.900 301.700 296.800 295.400 297.400 299.300 300.900 301.600 301.700 301.500 298.700 298.700 299.000 299.300 299.100 298.900 299.200 299.200...... {these values continue for the 500 grid points}
2011 9 12 298.800 299.000 299.400 299.800 299.700 299.500 299.500 299.200 299.200 299.300 299.900 299.700 299.200 299.000 299.100 299.700 300.500 300.700 296.500 295.200 297.200 299.600 301.200 302.100 302.000 301.700 298.800 298.800 299.100 299.300 299.000 298.900 299.200 299.300 299.300........
Year 2011, Month 09, Day 11 -> 12

Respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 9 de Ag. de 2016
M=dlmread('filename.txt')

Stalin Samuel
Stalin Samuel el 9 de Ag. de 2016

Categorías

Más información sobre Data Import and Export en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by